StripSlashesExtended
3
Sometimes you need to remove slashes from POST variables which could contain arrays. The standard slipslashes-function only takes a string as parameter.
This function removes slashes from both a simple string and array variable.
This function removes slashes from both a simple string and array variable.
function StripSlashesExtended($value)
{
if(is_array($value))
foreach($value as $key=>$val)
$value[$key] = stripslashes($val);
else
$value = stripslashes($value);
return $value;
}






There are currently no comments for this snippet.