note 41279 added to control-structures.foreach
| From: | stef at rn2 dot php dot net | Date: | Mon, 05 Apr 2004 13:37:36 +0000 |
| Subject: | note 41279 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67654@lists.php.net to get a copy of this message | ||
Having trouble with register_globals set to off, and no way of turning it on because of your hosting
agreement, or trying to move a legacy PHP site?
foreach ($_GET as $key => $value) {
$$key = $value;
}
This function sets global variables for all of variables sent via GET.
I.e. http://www.somewhere.com/myscript.php?name=value
sets a global variable $name = "value"
Obviously this has security implications, so use wisely!
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41279
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41279&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41279&report=yes
Search -- http://master.php.net/manage/user-notes.php