Condition Statements in PHP

In this article, you will learn How to use condition Statements in PHP

<?php 
$a = 15;
$b = 20;
$c = 30;

if($a > $b)
{
	if($a > $c)
        {
		echo $a.' is greater';
	}
	else 
        {	
	echo $c.' is greater';
	}
}
elseif ($b > $c) 
{
echo $b.' is greater';
}
else 
{
echo $c.' is greater';
}
?>

Output:-

30 is greater

 

Leave a Comment