Can someone please help me out with converting the following to html?
I have bbcode for a link that looks like this:
And I want to convert it to:
I tried using this:
But the result I get is this:
Due to the %22 it adds the current url to the beginning of the link and I cant seem to fix it.
Can anyone see where I'm going wrong or offer a better solution?
$originalpost = array("[url=", "[/url]", "]");
$replacedpost = array("<a href=", "</a>", ">");
$newpost = str_replace($originalpost, $replacedpost, $post);