|
<?php
function reverse_magic_quotes(&$array)
{
if (is_array($array))
{
foreach ($array AS $key => $val)
{
if (is_string($val))
{
$array["$key"] = stripslashes($val);
}
else if (is_array($val))
{
reverse_magic_quotes($array["$key"]);
}
}
}
}
?>
|
|
|
Usage Example
|
//reverse_magic_quotes($_REQUEST); // Seems to be needed on PHP5
reverse_magic_quotes($_POST);
reverse_magic_quotes($_GET);
reverse_magic_quotes($_COOKIE);
|
|
|
Rate This Script
|
|