PHP for Beginners: Conditionals
Conditional statements are used to preform different actions based on different conditions. In PHP, there are four conditional statements: if – execute code only if a specefied condition is true, if…else – execute code if a condition is true and another code if the condition is false, if…elseif…else – select one of several blocks of code to be executed, and switch – select one of many blocks of code to be executed.



