note 7864 added to foreach

From: Date: Thu, 17 Aug 2000 16:27:29 +0000
Subject: note 7864 added to foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-2205@lists.php.net to get a copy of this message
Which is faster? foreach($array as $index => $value) or while(list($index,$value) = each($array) if you want to simply loop through an array do assignments or print out values? Is there much of a difference? I have been pretty much been using the while-list-each and am wondering if I should switch or bother to retrofit my code. thanks rob http://www.php.net/manual/control-structures.foreach.php

« previous php.notes (#2205) next »