Conditional statements are used to perform different actions based on different conditions. In PHP, we have several conditional statements that allow our code to make decisions.
The if statement executes some code only if a specified condition is true.
The if...else statement executes some code if a condition is true and another code if that condition is false.
The if...elseif...else statement is used to test more than two conditions.
PHP also provides a shorthand way of writing if statements using the ? and : operators.
if...elseif structure, as soon as one condition is found to be TRUE, PHP executes the corresponding block and skips the rest of the conditions.