On Saturday 25 May 2002 05:21, Jeff Field wrote: > Anyone know how to declare globals in a function from an array? The > following doesn't seem to work: > > foreach($_POST as $key => $value) > global $form_var[$key];
Not sure what you're trying to do. If you're trying to extract all the values in $_POST so that they're available in the global scope then try: foreach($_POST as $key => $value) $GLOBALS[$key] = $value; } also look at extract(). -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* A fail-safe circuit will destroy others. -- Klipstein */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php