I need to remove double quotes from any possible post value. I currently have this code:
array_walk($_POST, create_function('&$val', '$val = str_replace(chr(34), chr(39), $val);'));
The problem is that its not working as expected. So if a post input box is set to the following when posted...
A " Test
The resulting post variable I get after running the array walk instead contains a slash chr !?! Ie...
A \' Test
Instead of
A Test
Can anyone suggest what's going on here ?