note 57846 deleted from reserved.variables by mazzanet

From: Date: Sun, 25 Dec 2005 23:44:48 +0000
Subject: note 57846 deleted from reserved.variables by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100708@lists.php.net to get a copy of this message
Note Submitter: LeChuck from <bfpdevel gmail dot com> ---- 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]]; } ?>

« previous php.notes (#100708) next »