1. traditional procedural: for loops 2. OO: while ($item = $collection->next)... 3. Stack: while (shift @collection)... 4. That Ruby thing with 'yield' (passing a closure) 5. returning a closure which acts as a next: while ($fetch->() ) 6. can't think of a six...
In reply to Iterator for multidimensional arrays by jcupp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |