error in replace
Posted: Mon May 25, 2009 2:52 am
below is my code:
And I m getting this error:
Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 1 in C:\xampp\htdocs\crm\replace.php on line 11
plz help me.
Code: Select all
$val = "(PT) :- PTFE with 316L SST(Diaphragm) 316L SST(Others)";
$t = preg_replace('/(/', '', $val, 1);
$tp = preg_replace('/)/', '', $t, 1);
$temp = str_replace($ans['Code'],"",$tp);
$temp1 = str_replace(":-","",$temp);
echo $temp1;
Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 1 in C:\xampp\htdocs\crm\replace.php on line 11
plz help me.