I have the following code
while (strpos($r, "[url]") !== FALSE){
$link = explode("[url]", $r);
$final_link = explode("[/url]", $link[0]);
$thelink = $final_link[0];
}
$r = str_replace("[url]","[url=$thelink]",$r);
If $r = [url]www.google.com[/url], I need to turn this into [url=www.google.com]www.google.com[/url]
This code doesn’t seem to be doing it. Have I missed something?
Give me a 500 error!
Thanks
1 Answer