Re: global generation

From: Date: Mon, 07 Jan 2002 16:18:29 +0000
Subject: Re: global generation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-79706@lists.php.net to get a copy of this message
Ooops, no $$ before GLOBALS, single $ for ($i=0; $i < $num_results; $i++) { $some= $GLOBALS["variable"]; // $some[$i] is what you need. } Regards, Andrey Hristov ----- Original Message ----- From: "Andrey Hristov" <ahristov@icygen.com> To: "Rodney Davis" <rodney@wincubic.com> Cc: <php-general@lists.php.net> Sent: Monday, January 07, 2002 6:15 PM Subject: Re: [PHP] global generation > try : > for ($i=0; $i < $num_results; $i++) > { > $some= $$GLOBALS["variable"]; > // $some[$i] is what you need. > } > > Regards, > > Andrey Hristov > ----- Original Message ----- > From: "Rodney Davis" <rodney@wincubic.com> > To: <php-general@lists.php.net> > Sent: Monday, January 07, 2002 6:11 PM > Subject: [PHP] global generation > > > > I need to call a generated variable global w/i a function but the > > following doesn't work: > > > > for ($i=0; $i < $num_results; $i++) > > { > > global $variable[$i]; > > } > > > > I am trying to pass a similarly created form element to a function. I > > have two questions. Why doesn't this work? And, what else can I do to > > get the same results. > > > > Thanks, > > > > rodney > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#79706) next »