0
I got the following Bbcode code that perfectly fits the logic of what I need to create link. Only it presents the following errors:
Warning: Unexpected Character in input: ' (ASCII=92) state=1 in /home/p3h8com/public_html/teste.php on line 3
Parse error: syntax error, Unexpected ';' in /home/p3h8com/public_html/teste.php on line 3
$str = '[url=http://www.abc.com.br]Blog do Beraldo[/url]';
$str = preg_replace( "/\[url=(.*?)\](.*?)\[\/url\]/i", "<a href="\"$1\"" target="\"blank\"">$2</a>", $str );
echo $str;