PHP 4.0 Bug #4203: each() does not reset() array. each() only works the first time.

From: Date: Thu, 20 Apr 2000 18:11:16 +0000
Subject: PHP 4.0 Bug #4203: each() does not reset() array. each() only works the first time.
Groups: php.dev 
Request: Send a blank email to php-dev+get-18067@lists.php.net to get a copy of this message
From: kai@jedi.net Operating system: Linux Red Hat 6.0 PHP version: 4.0 Release Candidate 1 PHP Bug Type: Misbehaving function Bug description: each() does not reset() array. each() only works the first time. # Gives list of vars in myarray while( list($a, $b) = each($myarray) ) { print $a . "," $b . "<br>\n"; } # Does nothing while( list($a, $b) = each($myarray) ) { print $a . "," $b . "<br>\n"; }

« previous php.dev (#18067) next »