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=]klik[ / url] to working ahref link

<a href="">klik</a>

$sTemplate = <<<EOT
<!-- POST -->
$sParsed = str_replace(array(
        "<!-- POST -->",
        "[center]", "[/center]"),
        "<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