PHP Control Structures

if, else, else if while do-while for Example 1: Example 2: Example 3: foreach break continue switch match include, include_once, require, require_once include: throws a warning and continues script execution. Will return false if file cannot be found. require: throws a fatal error if the file does not exist, and stops script execution. include_once: throws…