Efficency in looping arrays?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux