PHP single if Statements ?


The PHP single if statements is a single way decision/selection statement. When a set of statement have to be executed when an expression is evaluated to true. It is used when we have only one alternatives.

Syntax:-

if(expression)
{
statement 1
statement 2
.
.
statement n
}

Q.) W.A.P to print the biggest number using PHP simple if statement.
 <html>
 <head>
 <title>if statement</title>
 </head>
 <body>
 <?php
 $a=4; $b=3;$big;
 $big=$a;
 if($b>$big)
 {
 $big=$b;
 }
 echo $big;
 ?>
 </body>
 </html>
Output
4