我有以下法典:
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);
如果$r = [url]www.google.com[/url]
,我需要将这一编号改为[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