note 33881 rejected from function.explode by pollita

From: Date: Thu, 10 Jul 2003 05:02:56 +0000
Subject: note 33881 rejected from function.explode by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51822@lists.php.net to get a copy of this message
Note Submitter: php@lixlpixel.com ---- 'explode' helped me to make my old scripts work with register_globals OFF... just put this snippet on top of every page or put it on a seperate file and include it. <?php $varray = explode("&", $_SERVER['QUERY_STRING' ]); for( $x = 0; $x <= count($varray); $x++) { $var = explode("=", $varray[$x]); $$var[0] = $var[1]; } ?> takes only care of variables passed as xyz.php?foo=bar&morefoo=morebar ... see the register_globals entry in this documentation to see more (and probably better) solutions.

« previous php.notes (#51822) next »