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

Ajax Insert Records in Database Tutorial in PHP

Displaying Database data using Class, Object, Constructor, Destructor in PHP MySql

SubQuery with EXISTS and NOT EXISTS in PHP