Page 1 of 1

RegEx Error - Unexpected '='?

Posted: Wed Aug 10, 2005 7:35 am
by cbrian
Parse error: parse error, unexpected '=' in /home/stlawren/www/cbc/KoD/game/header.php on line 13

Code: Select all

$bb-replace = array ('#(\[link=)(.+)(\])(.+)(\[\/link\])#','#(\[img=)(.+)(\])#','#(\[profile=)(\d+)(\])(.+)(\[\/profile\])#','#(\[color=)(.+)(\])(.+)(\[\/color\])#');
$bb-replacements = array ('<a href="\\2">\\4</a>','<img src="\\2" />','<a href="game.php?where=profile&$thestamp&who=//2">//4</a>','<font color="//2">//4</font>');
Line 13 and 14. If I comment out 13, I get an error on 14. Do you see a problem?

Posted: Wed Aug 10, 2005 8:02 am
by feyd
your variable names are illegal.