Images

Looping Sections of Code

Images 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 if(), else, and 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. ...

Get PHP: 20 Lessons to Successful Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.