The if else statement is a simple selection/decision statement that is used when we must choose between two alternatives. So it is called two way decision statement.
Q.) W.A.P to print the greater number using PHP if-else statement.
<html>
<head>
<title>if else</title>
</head>
<body>
<?php
$a=6;
$b=4;
if($a>$b)
{
echo “ A is greater no”;
}
else
{
echo“B is greater no”;
}
?>
</body>
</html>
Output
A is greater no