Re: Re: Global Arrays ?
| From: | Philip Hallstrom | Date: | Fri, 21 Dec 2001 01:57:03 +0000 |
| Subject: | Re: Re: Global Arrays ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78385@lists.php.net to get a copy of this message | ||
I don't think it has to do with local/global variables... it's more likely
that he's already looped through a global array in which case the next
call to each() will fail because it's already at the end.
On Fri, 21 Dec 2001, Bogdan Stancescu wrote:
> Why is this needed in this case an not for local variables? You probably are right,
> I don't imply you aren't, but why is a reset needed in local scope when using
> global variables? Is it possible to start an each() in a function and continue it
> in another for global arrays?
>
> Philip Hallstrom wrote:
>
> > Add a reset($g_months) right before your while(...) statement.
>
>
> --
> 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
>