Mike,

The $GLOBALS array contains references to all variables defined in the global 
scope. By using the keyword global, you define a variable in the global scope 
(and then make it accessible through $GLOBALS).

The superglobals (eg _POST, _GET, etc) don't get this automatically, because 
they are "scopeless".

It would only work if you used the following code beforehand:

global $_POST['photo'];

hth.
-- 
Adam Goossens

=======================================
Quoting [EMAIL PROTECTED]:
>
>When running the following code: 
>
>foreach($GLOBALS['photo'] as $photo) 
>
>I get: 
>
>Warning: Invalid argument supplied for foreach() on line 63 
>
>Would register globals have to be on for this code to work?  Am I using the 
>$GLOBALS clause wrong?  It would seem to me that this should work since you 
>can use post in the same fashion. 
>ie: foreach($_POST['photo'] as $photo) 
>
>~ Mike 

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to