--
From: Boget, Chris [SMTP:[EMAIL PROTECTED]]
Sent: 07 January 2002 19:20
To: 'Kevin Stone'; Rodney Davis; [EMAIL PROTECTED]
Subject: RE: [PHP] global generation
> Wait until after the for loop has completed.
&g
> Wait until after the for loop has completed.
> for ($i=0; $i< $num_results; $i++) {
> $variable[$i];
> }
> global $variable;
That's not going to work. The only thing that is doing is
making an already global instance of $variable global
within the function.
What you want is this instead:
$GL
Wait until after the for loop has completed.
for ($i=0; $i< $num_results; $i++)
{
$variable[$i];
}
global $variable;
> 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 tr
s" <[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.
> }
>
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 genera
5 matches
Mail list logo