O'Reilly logo

PHP for the Web: Visual QuickStart Guide, Fourth Edition by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Control Structures

Control structures—conditionals and loops—are a staple of programming languages. PHP has two conditionals—if and switch—both of which you’ll master in this chapter. Conditionals allow you to establish a test and then perform actions based on the results. This functionality provides the ability to make Web sites even more dynamic.

The discussion of if conditionals requires introduction of two last categories of operators: comparison and logical (you’ve already seen the arithmetic and assignment operators in the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required