/ Published in: PHP
URL: http://www.misteroneill.com
If you're on a server that uses magic_quotes and you can't change that (depending on php.ini settings) I've used this function to remove annoying escape slashes. Also, sometimes you'll work with data coming from a database that someone wrote escaping slashes into.
Expand |
Embed | Plain Text
function stripslashes_deep($data) { foreach ($data as $i => $val) { } } return $data; }
Comments
Subscribe to comments
You need to login to post a comment.

function stripslashesdeep($data) { if (isstring($data) && getmagicquotes_gpc()) return stripslashes($data);
}