Page 1 of 1

boggled by the each() function

Posted: Mon Dec 09, 2002 4:13 pm
by permutations
Could someone explain to me how the each function works. I've read the manual, but it makes no sense to me. Why would the key name and value be returned TWICE for each element. I've tried to find another source to explain it in different words, but everything quotes the manual.

Thanks in advance.

Posted: Mon Dec 09, 2002 5:04 pm
by volka
there is no real reason. It's just implemented this way.
You can access the array either by 0/1 or key/value - as you wish ;)