note 27726 added to function.array-keys

From: Date: Tue, 17 Dec 2002 02:23:58 +0000
Subject: note 27726 added to function.array-keys
Groups: php.notes 
Request: Send a blank email to php-notes+get-40993@lists.php.net to get a copy of this message
Here's a quick and dirty way that I was able to upgrade from 4.0.x to 4.2.x when using the recommended and more secure php.ini was installed. I had a lot of *sloppy* code (and probably still do), but this got me through the upgrade well enough to be able to go back and fix the scripts. Putting this at the top of your script will get all of the variables that you are passing. foreach (array_keys($_GET) as $key ) { $$key=$_GET[$key]; } You can also substitute GET for SERVER, POST, etc. I may also be worth mentioning that I haven't been able to get this to work as an include. Probably for the same reasons that passing $value as a global value won't work. -- http://www.php.net/manual/en/function.array-keys.php http://master.php.net/manage/user-notes.php?action=edit+27726 http://master.php.net/manage/user-notes.php?action=delete+27726 http://master.php.net/manage/user-notes.php?action=reject+27726

« previous php.notes (#40993) next »