If_Else_Statement
<?php
$x = 15;
if($x > 30)
{
echo "X is Greater<br>";
}
else
{
echo "X is Smaller<br>";
}
if($x == "15")
{
echo "X is Same<br>";
}
else
{
echo "X is not Same<br>";
}
//In case of "===", it will check Value as well as Data Types of Variable
if($x === "15")
{
echo "X is Same in case of Value and Data Types<br>";
}
else
{
echo "X is Not Same in case of Value and Data Types<br>";
}
//OUTPUT:
//X is Smaller
// X is Same
// X is Not Same in case of Value and Data Types
?>
Comments
Post a Comment