note 20173 deleted from function.stripslashes by aidan
| From: | aidan@php.net | Date: | Sun, 29 Aug 2004 10:23:59 +0000 |
| Subject: | note 20173 deleted from function.stripslashes by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75540@lists.php.net to get a copy of this message | ||
Note Submitter: alex at netflex dot nl
----
Hi,
This is a better way if your have big array's
$test[1][1][1] = "\\hi";
$test[1][2][1] = "\\hi";
$test[2][1][1] = "\\hi";
$test[2][1][3] = "\\hi";
$test[3][2][2] = "\\hi";
print_r($test);
stripslashes_array($test);
print_r($test);
function stripslashes_array(&$array) {
while (list($key) = each($array)) {
if (is_array($array[$key])) {
stripslashes_array($array[$key]);
} else {
$array[$key] = stripslashes($array[$key]);
}
}
}