OK, sorry, I tried to help... and finaly I learn (I didn't know extract...)
-----Message d'origine----- De : Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Envoy� : lundi 21 juillet 2003 14:35 � : 'stfmoreau'; Daryl Meese; [EMAIL PROTECTED] Objet : RE: [PHP] Register Globals > -----Original Message----- > From: stfmoreau [mailto:[EMAIL PROTECTED] > Sent: 21 July 2003 13:23 > > include this code in your header file : > // _GET > if (isset($_GET)) > while (list($key, $val) = each($_GET)) > { > eval ("$".$key." = '".$val."';"); > } Whoa! Nasty and inefficient!! I can understand if you decide initially to use a brute-force drop-in replacement for register_globals, and leave modifying the rest of your code until later, but really: (i) Better: // _GET if (isset($_GET)) foreach ($_GET as $key=>$val) { $$key = $val; } (ii) Even better: // _GET if (isset($_GET)) extract($_GET); Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

