jmichael68 Posted October 24, 2006 Share Posted October 24, 2006 $string is a variable returned from an array$string = ')Football'; $numer12 = ''; $new = str_replace(")",$numer12,$string); echo"$new";gives me this errorParse error: syntax error, unexpected T_STRING in /webroot/s/u/supfr001/ssl/functions.php on line 895Any Ideas???? Link to comment https://forums.phpfreaks.com/topic/25001-replacing-parenthesis-using-ereg_replace/ Share on other sites More sharing options...
Stooney Posted October 25, 2006 Share Posted October 25, 2006 well first off:[code]$numer12 = '';[/code]should be:[code]$numer12=""; //assuming you want to remove the ( completely[/code]basically you have to close any quotation marks you start before the semi-colon. Link to comment https://forums.phpfreaks.com/topic/25001-replacing-parenthesis-using-ereg_replace/#findComment-114022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.