You can use conditional statements in your code to make your decisions. PHP supports following decision making statements:
if statement - executes some code only if a specified condition is true.
if...else statement - use this statement if you want to execute a set of code when a condition is true and another if the condition is not true.
if...elseif statement - is used with the if...else statement to execute a set of code if one of several condition are true.
switch statement - is used if you want to select one of many blocks of code to be executed, use the Switch statement. The switch statement is used to avoid long blocks of if..elseif..else code.