Control structures include branching structures, which allow your program to make all these things:
if. . .then decisions
Loops, which let you execute some code repeatedly
Functions that put specialized code into their own separate section
When you run a program, you expect it to go from beginning to end. Usually, the program displays everything that is in the code, putting each section one after another. When you write an HTML page, every part of the page is displayed in the same order as it is defined in the source. However, you might want to change that flow. You might need to perform a different action because some special event occurs. PHP offers a way to do this with branching structures.
The easiest way is to use ...