Conditional Statements in PHP

Conditional Statements in PHP

<?php
$a =10;                  // This statement assigns 10 to a
$b = 15;               //This statement assigns 15 to b
if( $a > $b)           // Checks whether  a is greater than b i. e. 10 > 15 here false
{
echo ” a is greater than b”;
} else
echo ” a is less than b”; // This statement will be executed.
?>
____________________________________
Out put-  a is less than b
____________________________________

Leave a Comment

Your email address will not be published. Required fields are marked *

©Postnetwork-All rights reserved.