note 21022 added to function.stripslashes
| From: | jb at jbpros dot com dot NOSPAM | Date: | Thu, 25 Apr 2002 14:46:58 +0000 |
| Subject: | note 21022 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29838@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]);
}
}
}
--
http://www.php.net/manual/en/function.stripslashes.php
http://master.php.net/manage/user-notes.php?action=edit+21022
http://master.php.net/manage/user-notes.php?action=delete+21022
http://master.php.net/manage/user-notes.php?action=reject+21022