This recursive function will strip slashes from each array element. It works fine with multidimensional arrays. Might become handy for $_POST or $_GET or whatever you need it.
function StripArraySlashes($arr)
{
foreach ($arr as $k => $v)
$ReturnArray[$k] = (is_array($v)) ? StripArraySlashes($v) : stripslashes($v);
return $ReturnArray;
}
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)


» Latest comments