Href parse

someone can explaine and add for this a href parser?
from database row[9] i got all text, but i dont know how to convert this
[url=http://www.page.com]klik[ / url] to working ahref link

<a href="http://www.page.com">klik</a>

$sTemplate = <<<EOT
<!-- POST -->
EOT;
$sParsed = str_replace(array(
        "<!-- POST -->",
        "[center]", "[/center]"),
        array(
        $row[9],
        "<center>", "</center>"),
$sTemplate );

        echo $sParsed;

It looks like you’re using BBCode, you could try the following:

  $Text = preg_replace("/\\[url\\]([$URLSearchString]*)\\[\\/url\\]/", '<a href="$1">$1</a>', $Text);
  $Text = preg_replace("(\\[url\\=([$URLSearchString]*)\\](.+?)\\[/url\\])", '<a href="$1">$2</a>', $Text);

i do not know how to add to work he with bbcode parser :frowning:

fixed thanks
sorry for doublepoost but i didnt know why i cant edit post…

that code should work regardless of any BBcode parser