In this tutorial you will learn about the PHP If…Else and its application with practical example.
The If…Else Statement
When we want to execute some block of code if a condition is true and another block of code if a condition is false, In such a case we use if….else statement.
1 2 3 4 |
if (condition) //Block of code to be executed comes here if condition is true; else //Block of code to be executed comes here if condition is false; |