PHP Tutorials – Conditional Statements
PHP Tutorials – Conditional Statements In this PHP Tutorials you will learn about Conditional Statements – if statement, if-else statement, Alternative if-else statement and switch statement. if statement: if syntax is as follows: if (an expression that return Boolean value) { Code to be executed. } PHP evaluates the Boolean expression to true or false, if the evaluation result is true, then the code inside the curly braces is executed, else it will be ignored. Example: <?php $x = 5; if($x < 10) { // returns true echo $x; // Will be executed }…