This section describes 4 forms of 'if' statements supported in PHP. The more complex form is 'if ... elseif ... else'.
There are 4 forms of "If" statements supported in PHP:
1. Single-statement "if":
if (condition) statement
where "condition" is a Boolean value, and "statement" specify another statement.
The specified statement will be executed,
if and only if the specified condition is evaluated to "TRUE".
2. Multi-statement "if":
if (condition) {
statement;
statement;
...
}
The specified multi-statement block will be executed,
if and only if the specified condition is evaluated to "TRUE".
Two statement blocks are specified. But only one statement block will be executed based on the value of
the specified condition. If the specified condition is "TRUE", the first block will be executed.
If the specified condition is "FALSE", the second block will be executed.