Parsing ' 's
Posted: Wed Jan 14, 2004 6:26 pm
I have a datebase, but when I try to enter things into it with ' 's in it, it returns a '' instead of '. I wrote this simple function to try to fix it, but it doesn't seem to work!
The ' 's still have a \ infront of them. Help!
Code: Select all
function fromsafe($var1) {
$var2 = "''";
$var3 = "'";
return(ereg_replace($var2, $var3, $var1));
}The ' 's still have a \ infront of them. Help!