Else statements execute when the if statement’s condition evaluates to false. Remember, the expressions inside of the if statement can only execute when the conditional expression evaluates to true.
Elseif: Between if and Else
PHP – P26: elseif Statement
When you have more than 2 outcomes in your decision making, you’re going to need to use the PHP elseif statement. The elseif keyword goes in between the if and the else keywords.
The ternary operator is a way to quickly express if/else statements. If the boolean expression evaluates to true, the “if_true” result is displayed, otherwise the “if_false” result is displayed.