The foreach Statement

Oct 13, 2009 Author: LinuxAdmin
The foreach statement is similar to for in that it is basically a specializedform of the while loop. Foreach, however, unlike for, is to be used witharrays.Like for, foreach automatically performs a step…

Using foreach to print a list of array

Sep 24, 2009 Author: christina
The first example involves using foreach to print a list of array elementsalong with their numeric index.