If Statement Tutorial in PHP

 <?php

$a = 3;
$b = 10;
if($a < $b)
{
    echo "A is Smaller<br>";
}
//Another Syntax for if statement
if($a < $b):
    echo "A is Smaller than B<br>";
endif;

$c = 20;
$d = 20;
if($c == $d)
{
    echo "C is Equal to D<br>";
}

$e = 30;
$f = "30";
if($e == $f)
{
    echo "e is Equal to f<br>";
}
if($e === $f)
{
    echo "e is Not Equal to f<br>";
}
?>






Comments

Popular posts from this blog

GROUP BY Clause and HAVING Clause in PHP

Method Overriding in Traits in PHP

Mysqli database Connection and Display Table Data from Database