Hey guys,
I think this is really simple and my brain is just not reacting right, but I am having trouble looking through a string for the characters ' , ( and ) and putting it into a db.
Here is what I have:
$vowels = array("/'/", "/,/", "/(/", "/)/");
$replacements = array("", "", "", "");
$results2 = preg_replace($vowels,$replacements,$results);
$sql = mysql_query("INSERT INTO urllist (webaddress, ourclient, depth) VALUES('$results2', '$client', '2')") or die (mysql_error());
and get the error: Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 0 in script.php on line 40
I know i am being retarded but could someone tell me how I search and replace those symbols?
Cheers,
Greg
I think this is really simple and my brain is just not reacting right, but I am having trouble looking through a string for the characters ' , ( and ) and putting it into a db.
Here is what I have:
$vowels = array("/'/", "/,/", "/(/", "/)/");
$replacements = array("", "", "", "");
$results2 = preg_replace($vowels,$replacements,$results);
$sql = mysql_query("INSERT INTO urllist (webaddress, ourclient, depth) VALUES('$results2', '$client', '2')") or die (mysql_error());
and get the error: Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 0 in script.php on line 40
I know i am being retarded but could someone tell me how I search and replace those symbols?
Cheers,
Greg