note 36443 added to control-structures.foreach
| From: | web at php-coding dot de | Date: | Thu, 09 Oct 2003 16:37:29 +0000 |
| Subject: | note 36443 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-58147@lists.php.net to get a copy of this message | ||
if your hoster has compiled php with "register_globals = off" you can use these small
scripts to make your own automatical globalization of external variables:
####################################
// for variables per get
foreach ($_GET as $var_name => $var_value) {
$$var_name = $var_value;
}
// for variables per post
foreach ($_POST as $var_name => $var_value) {
$$var_name = $var_value;
}
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36443
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36443&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36443&report=yes
Search -- http://master.php.net/manage/user-notes.php