The Little Guy Posted December 3, 2011 Share Posted December 3, 2011 My regexp has an error, and I can't figure out where it is coming from. Parse error: syntax error, unexpected '.' in /home/ryannaddy/tutorials.phpsnips.com/incl/classes/Main.inc.php(87) : regexp code on line 1 $string = preg_replace("/\[code\](.+)\[\/code\]/isUe", "'<span class=\"exampletxt\">EXAMPLE:</span><div class=\"code\">'.str_replace('<br />','',$1).'</div>';", $string); How would I fix that? Link to comment https://forums.phpfreaks.com/topic/252356-syntax-error-unexpected/ Share on other sites More sharing options...
The Little Guy Posted December 3, 2011 Author Share Posted December 3, 2011 Oops, my mistake forgot to add quotes around the $1 Link to comment https://forums.phpfreaks.com/topic/252356-syntax-error-unexpected/#findComment-1293723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.