In this chapter we turned our attention to the structures that form the building blocks of every useful PHP application:
The conditional statements if and switch are used to test a condition and execute different blocks of code depending on the results.
The loops while, do … while, and for allow repetitive behavior. The foreach loop is specifically designed for traversing the elements of an array.
Functions are reusable units of code that can be invoked as necessary to perform specific tasks. They make code more modular and maintainable.
Arrays are lists of values that can be stored in a single variable.