Hello,
I have the following code:
$string = '[url]http://google.com[/url]';
$bbreplace = array ('/\[url\](.+?)\[\/url\]/');
$bbreplacements = array ('<a href=\"\\1\">\\1</a>');
$string = preg_replace($bbreplace, $bbreplacements, $string);
print $string;
Which creates a url called http://google.com/ that points to
mydomain.com/"http://google.com/"
instead of
http://google.com/
How can I fix this? Thanks