- The Comparison operator is used for compare between two number.
- There are study a some operators:-
Example:-
<?php
$number1=’10’;
$number2=10;
if($number1==$number2)
{
echo “Equal”;
}
else
{
echo “Not Equal”;
}
?>
OUTPUT:-
Equal
Logical Operators - The logical operator is used for logic apply between to equation.
- Here, we are see a some operators:-
Example:-
<?php
$number1=20;
$number2=10;
if(($number1>$number2)and($number1==$number2))
{
echo “Equal”;
}
else
{
echo “Not Equal”;
}
?>
OUTPUT:-
Not Equal
0 Comments:
Post a Comment