In this lesson our instructor gives an introduction to
conditional loops. First, he discusses while loop, looping over
arrays, and array traversal functions. Then he talks bout
looping over indexed and associative arrays. He also lectures on
looping over arrays using list() and each(), control structure
scope and coding conventions. He ends the lesson with a helpful
homework challenge. A while loop is a conditional control
structure that executes a statement group repeatedly as long as
its specified test condition remains A while loop’s test
condition’s value is compared to TRUEbefore each execution of
the loop’s statement group. 'Looping over arrays' is a common
programming function, and PHP provides several built-in
functions for doing so. They work on the basis of an array
cursor , which is a 'marker' for the 'current' array element:
current() – returns the value of the array element at the
current array cursor position key() – returns the key of the
array element at the current array cursor position next(