Oh, ok. It is working now, but it displays a strange link when it finds the tags. Also, I was wondering what should go in the regex statement at the beginning. I noticed that originally it was([[]+), and now it is (.*?). I'm not really sure what these are so I can't really mess around with anything, but they both yield different results, the second one with some more errors.
Anyway, here is the link to the page: http://www.mtgzone.com/cards/first_test.php. The file looks like:
<?php
$html = "here is the [card]sample card[/card].";
$html = preg_replace('/[card]([^[]+)[\/card]/i', " <a href=\"cards.php?name=Card Title\">\1</a> ", $html);
echo "$html";
?>
And the html output was:
here is the [ <a href="cards.php?name=Card Title"></a> [/ <a href="cards.php?name=Card Title"></a> ].
Also, I was wondering if there is an alternative way of doing this without setting the $html to be the text the preg_replace searches through. Ideally, I would like to set something up to simply run through the entire page and run this operation on every instance of the tag.
Thank you for the help.
~ender