note 21022 rejected from function.stripslashes by torben
| From: | torben@php.net | Date: | Thu, 25 Apr 2002 18:27:41 +0000 |
| Subject: | note 21022 rejected from function.stripslashes by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29848@lists.php.net to get a copy of this message | ||
Wouldn't be better to make it like this to prevent non-string values to be modified to string
values?
function stripslashes_array(&$array) {
while (list($key) = each($array)) {
if (is_array($array[$key])) {
stripslashes_array($array[$key]);
}
elseif (is_str($array[$key])) {
$array[$key] = stripslashes($array[$key]);
}
}
}