Re: $GLOBALS

From: Date: Fri, 13 Jun 2003 06:38:31 +0000
Subject: Re: $GLOBALS
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-20299@lists.php.net to get a copy of this message
Hmm... I think the first part of foreach should be an array... So, more like foreach($GLOBALS as $photo)... Unless photo is an array containing photos... However, how to make a variable become global, I'm not sure of... "Mike" <mike@homemarketing.net> skrev i meddelandet news:20030611201643.48364.qmail@pb1.pair.com... > 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 > >

« previous php.windows (#20299) next »