Jump to content

Archived

This topic is now archived and is closed to further replies.

jmichael68

Replacing Parenthesis using ereg_replace

Recommended Posts

$string is a variable returned from an array

$string = ')Football';
  $numer12 = '';
 
  $new = str_replace(")",$numer12,$string);
 
  echo"$new";

gives me this error
Parse error: syntax error, unexpected T_STRING in /webroot/s/u/supfr001/ssl/functions.php on line 895

Any Ideas????

Share this post


Link to post
Share on other sites
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.       

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.