Jump to content


Photo

Replacing Parenthesis using ereg_replace


  • Please log in to reply
1 reply to this topic

#1 jmichael68

jmichael68
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 24 October 2006 - 11:14 PM

$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????



#2 Stooney

Stooney
  • Members
  • PipPipPip
  • Advanced Member
  • 1,093 posts
  • LocationLas Cruces, NM

Posted 25 October 2006 - 05:45 AM

well first off:

$numer12 = '';
should be:
$numer12="";   //assuming you want to remove the ( completely

basically you have to close any quotation marks you start before the semi-colon.       

<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users