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" <[EMAIL PROTECTED]>
To: "Rodney Davis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
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" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to