note 21023 added to function.stripslashes

From: Date: Thu, 25 Apr 2002 14:56:04 +0000
Subject: note 21023 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-29839@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_string($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+21023 http://master.php.net/manage/user-notes.php?action=delete+21023 http://master.php.net/manage/user-notes.php?action=reject+21023

« previous php.notes (#29839) next »