note 25549 deleted from language.variables.external by philip

From: Date: Thu, 10 Oct 2002 20:15:48 +0000
Subject: note 25549 deleted from language.variables.external by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-37915@lists.php.net to get a copy of this message
[Editor's note: The contributor overlooked a simpler way of doing this: extract($_GET); etc.] when register_globals is turned off, and u want to use it anyway :) use this script at the top of your program: if (is_array($_POST)) { for (reset($_POST); $key = key($_POST); next($_POST)) { $$key = $_POST[$key]; } } if (is_array($_GET)) { for (reset($_GET); $key = key($_GET); next($_GET)) { $$key = $_GET[$key]; } } if (is_array($_SESSION)) { for (reset($_SESSION); $key = key($_SESSION); next($_SESSION)) { $$key = $_SESSION[$key]; } } if (is_array($_COOKIE)) { for (reset($_COOKIE); $key = key($_COOKIE); next($_COOKIE)) { $$key = $_COOKIE[$key]; } } if (is_array($_PUT)) { for (reset($_PUT); $key = key($_PUT); next($_PUT)) { $$key = $_PUT[$key]; } } have fun :)

« previous php.notes (#37915) next »