Direttamente dal manuale PHP (http://it.php.net/manual/it/security....disabling.php)

Codice PHP:
if(get_magic_quotes_gpc())
{
   function 
stripslashes_deep($value)
   {
      
$value is_array($value) ?
               
array_map('stripslashes_deep'$value) :
               
stripslashes($value);

      return 
$value;
   }
}

$variable stripslashes_deep($variable);