Conditionals in PHP (if statements)
Conditional in PHP language are expressed with if statements. If statements evaluate if the condition evaluates to true, in this case the code which is within if statement clause will execute. If statement can end, or it may have additional conditions.
Each condition maybe complex and include multiple conditions that are linked with Boolean expressions such as AND or OR.
An expression can be reversed by utilizing NOT logic.
If a condition evaluates to false, then code section within it does not execute.
It is possible to chain multiple conditions. These are optional.
Also an optional statement is else section. The code within that section will execute if all the conditions above it will evaluate to False.
Comments
Post a Comment