Use of PHP Comparison Operators is comparing two values (number or string).

Operator Description
== Is equal to
=== Identical
!= Is not equal to
<> Is not equal to
!== Is Identical
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to


$a = 20;
$b = 30;

if ($a == $b) {
    echo "a and b is equal";
} else {
    echo "a is not equal to b";

Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram