Posted by Pawel Kraszewski on 03/21/07 16:26
e_matthes@hotmail.com wrote:
> I have no trouble looping through an array using foreach. To keep
> track of the index, I set a variable before the loop and increment it
> in the loop:
foreach ($array as $index => $item) {
blah;
do something that requires knowing the index of the current item;
}
I didn't notice someone shut www.php.net down along wih all the necessary
manuals...
http://www.php.net/manual/en/control-structures.foreach.php
--
Pawel Kraszewski
www.kraszewscy.net
[Back to original message]
|