note 22611 added to function.each

From: Date: Tue, 25 Jun 2002 08:28:15 +0000
Subject: note 22611 added to function.each
Groups: php.notes 
Request: Send a blank email to php-notes+get-32165@lists.php.net to get a copy of this message
This is a small loop I use to addslash all post vars when register globals is set to true. I usually made wrote one addslashes call for every variable when I was learning PHP. Maybe this helps somebody out of that misery. while(List($key,)=each($HTTP_POST_VARS)) $$key=addslashes($HTTP_POST_VARS[$key]); Cheers Hugo -- http://www.php.net/manual/en/function.each.php http://master.php.net/manage/user-notes.php?action=edit+22611 http://master.php.net/manage/user-notes.php?action=delete+22611 http://master.php.net/manage/user-notes.php?action=reject+22611

« previous php.notes (#32165) next »