The if , elseif ...else and switch statements are used to take decision based on the different condition.
You can use conditional statements in your code to make your decisions. PHP supports following three decision making statements:
If you want to execute some code if a condition is true and another code if acondition is false , use the if....else statement.
The following example will output "Have a nice weekend!" if the current day is Friday, otherwise it will output "Have a nice day!":
© 2015-16 All Rights Reserved Tech9schools