If / Else Example

The number is greater than 10.

Switch Case Example

Today is Monday.

In PHP, conditional statements allow you to make decisions based on conditions you have set. An if/else statement checks whether a condition is true or false. Constructs such as the switch statement, which selects and evaluates the matching case of a variable against available patterns, control the flow of a program.