IF control structure in PHP
It is possible to execute specific code conditionally. This is done using if statement if statement. This statement includes code or condition. If this condition evaluates to true, than code within if statement will execute. It is possible to have alternative cases. In PHP it is represented with else if keywords. There could be zero or more alternative cases. Each case will have specific condition to try. If it evaluates to true, then the code that it within that condition will execute, otherwise flow of the program will continue to the next case and so on. It is possible to have optional default case. This case does not have any condition. It will execute if all of the cases above it evaluate to FALSE. In PHP it is represented with else keyword.