You are here: Re: Looping through arrays with foreach « PHP Programming Language « IT news, forums, messages
Re: Looping through arrays with foreach

Posted by chernyshevsky@hotmail.com on 03/31/06 23:39

Sjoerd wrote:
> Another method to loop through an array is the following:
> ?php
> while (list(, $value) = each($arr)) {
> echo "Value: $value<br />\n";
> }
> ?
>
The main problem with the list() = each() construct is that it has a
side-effect--namely that of advancing the array's internal pointer.
Forgetting to call reset() on an array was a common mistake in PHP 3.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация