Chapter 5. Control Structures
This chapter examines how you define, declare, assign, compare, and process variables in conditional and iterative structures. It covers the following topics:
Conditional structures
If statement
Switch statement
Iterative control structures
Do-While loop
For loop
Foreach loop
While loop
By the end of this chapter, you will have completed your introduction to PHP and can begin writing larger and more complex programs.
While you now understand primitive variable definition and assignment, variables require conditional and iterative structures to become useful. This section will examine conditional structures and then iterative structures available in PHP.
Get Oracle Database 10g Express Edition PHP Web Programming 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.