$AOG_te = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href="\\0">\\0</a>", $AOG_te);
$AOG_te = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href="$1">$2</a>",$AOG_te);
i have that above code in my bbcode function.
But ereg_replace did not allow the preg_replace to work, what can i do so that two will work without affecting each other.
If user post http:// coding-talk.com or [ url=http:// coding-talk.com]coding-talk[/url] should turn to link.
$AOG_te = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href="$1">$2</a>",$AOG_te);
i have that above code in my bbcode function.
But ereg_replace did not allow the preg_replace to work, what can i do so that two will work without affecting each other.
If user post http:// coding-talk.com or [ url=http:// coding-talk.com]coding-talk[/url] should turn to link.
Comment