note 20173 added to function.stripslashes
| From: | alex at netflex dot nl | Date: | Mon, 25 Mar 2002 13:00:07 +0000 |
| Subject: | note 20173 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28174@lists.php.net to get a copy of this message | ||
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]);
}
}
}
--
http://www.php.net/manual/en/function.stripslashes.php
http://master.php.net/manage/user-notes.php?action=edit+20173
http://master.php.net/manage/user-notes.php?action=delete+20173
http://master.php.net/manage/user-notes.php?action=reject+20173