foreach vs. while(list() = each())

From: Date: Wed, 11 Apr 2001 18:49:31 +0000
Subject: foreach vs. while(list() = each())
Groups: php.general 
Request: Send a blank email to php-general+get-48193@lists.php.net to get a copy of this message
What are the differences in these? I know with while() you have to reset() the array afterwards, but foreach() you don't. Also foreach() appears to be quite a bit faster. My main question is there ANY difference in how these two loop through the array. --Joe /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/

« previous php.general (#48193) next »