note 57846 added to reserved.variables
| From: | LeChuckfrom | Date: | Sun, 16 Oct 2005 17:53:34 +0000 |
| Subject: | note 57846 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97085@lists.php.net to get a copy of this message | ||
A litle modification to the Sebastian's function.
now you can use only globalVars() without args.
<?
//Set global variables
function globalVars()
{
$keys = ($_POST) ? array_keys($_POST) : array_keys($_GET);
for($i = 0; $i < count($keys); $i++)
${$keys[$i]} = (isset($_POST[$keys[$i]])) ? $_POST[$keys[$i]] : $_GET[$keys[$i]];
}
?>
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57846
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57846&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57846&report=yes
Search -- http://master.php.net/manage/user-notes.php