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

From: Date: Thu, 20 Apr 2000 18:53:21 +0000
Subject: PHP 4.0 Bug #4203 Updated: each() does not reset() array. each() only works the first time.
Groups: php.dev 
Request: Send a blank email to php-dev+get-18074@lists.php.net to get a copy of this message
ID: 4203 Updated by: zeev Reported By: kai@jedi.net Status: Closed Bug Type: Misbehaving function Assigned To: Comments: each() is not supposed to reset the array. If it did, it would have always returned the first element. You must reset the array yourself before calling each(). Alternately, you can use the foreach() loop in PHP 4.0 Full Bug description available at: http://bugs.php.net/version4/?id=4203

« previous php.dev (#18074) next »