Similar most programming languages, PHP also allows you to write code that does different actions based on the decisions of a logical or comparable test conditions at run time. That means you can create test conditions in the form of expressions that decides to either true or false and based on those results you can do specific actions. You can improve the decision making process by giving an alternative option through adding an else statement to the if statement. The if…else statement enables you to execute one section of code if the detailed condition evaluates to true and another section of code if it is decided to false.
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]