note 45389 added to control-structures.foreach

From: Date: Sat, 04 Sep 2004 18:10:34 +0000
Subject: note 45389 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-76017@lists.php.net to get a copy of this message
If you have a lot of post fields and are defining them into simple variables like this: <?php $variable01 = $_POST['variable01']; $variable02 = $_POST['variable02']; ?> Make your life easier doing this: <?php foreach($HTTP_POST_VARS as $key => $value) { $$key = $value; } ?> Hope this is of help to someone. Yuri ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45389 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45389&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45389&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76017) next »