Efficency in looping arrays?

From: Date: Wed, 17 Nov 2004 12:11:11 +0000
Subject: Efficency in looping arrays?
Groups: php.general 
Request: Send a blank email to php-general+get-202282@lists.php.net to get a copy of this message
Best groupmember, For the moment when I loop an array I use something like this: reset($arr); while($a=each($arr)) { echo $a['value']; } But the each() function genereates a array with four elements (0,1,value, key), I am only interested in the "value". It does not feel efficient if I have a big array to do this. How do I loop thru the array without the overhead of each()? - Best Of Times /Peter Lauri

« previous php.general (#202282) next »