To view the accompanying video for this lesson, please visit mhprofessional.com/nixonphp/.
In the previous lesson, you learned all about program flow control, branching, and using
switch() statements. These are perfect for altering the program flow according to values and expressions, but not so good when you need to repetitively execute a process, such as processing a document a word at a time to find typographical errors.
This is the type of situation where PHP’s looping statements come into their own. ...