On 15 Jul 2010, at 04:12, Dave M G wrote: > Yes, stripslashes() was the problem. I've removed it and the code works. > > However, it seems that when I send JSON data from a Javascript file, stripslashes() is necessary. That's why I had it there. I'm not entirely sure what's going on there, so obviously more experimentation is needed. Presumably, thanks to your PHP settings, you need stripslashes() on all $_GET, $_POST, and $_COOKIE input. http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc This does not apply to input from other sources. -- Benjamin Hawkes-Lewis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php