PHP » Control Structures

Control structures change the flow of execution in a script. if and switch statements are used to choose to between different blocks of code to execute. The same block of code can be repeated multiple times with for, foreach, while, and do loops. break, continue, exit(), and die() stop the execution of a script or block of code. Finally, the include and require functions provide a way for PHP scripts to call other PHP scripts.