note 20239 deleted from function.set-magic-quotes-runtime by didou
| From: | didou@php.net | Date: | Thu, 29 May 2003 21:45:38 +0000 |
| Subject: | note 20239 deleted from function.set-magic-quotes-runtime by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49332@lists.php.net to get a copy of this message | ||
Note Submitter: tjerkos@stack.nl
----
This approach works quite good for me:
function stripit(&$a)
{
if (is_array($a))
{
foreach ($a as $fname => $fval)
{
if (is_array($fval))
stripit($a[$fname],$tmp[$fname]);
else
$a[$fname]=stripslashes($fval);
}
}
}
if (get_magic_quotes_gpc())
{
stripit($HTTP_GET_VARS);
stripit($HTTP_POST_VARS);
stripit($HTTP_COOKIE_VARS);
}