note 18769 deleted from function.addslashes by philip
| From: | philip@php.net | Date: | Tue, 20 Jul 2004 17:21:12 +0000 |
| Subject: | note 18769 deleted from function.addslashes by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73716@lists.php.net to get a copy of this message | ||
Note Submitter: mads@danquah.dk
----
If you want to slash an entire array recursively (as many dimensions as you want) you could do it
like this :
function array_slash($array)
{
if(is_array($array)){
foreach($array as $key => $val){
$return[$key] = array_clean($val); // recurse
}
return($return);
}
else{
return(addslashes($array)); // return slash'ed value
}
}