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: [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]