Comparison Operator in Php


An operator is a symbol that represent a specific action.Operators are used to perform operations on variables and values.

Comparison Operator
Comparison Operator is used to compare between two and more variables and values . In Php double equal to ( == ) sign is used used as compression operator.

Example
<!DOCTYPE html>
<html>
<head><title>expertcodingmaster.com</title>
</head>
<body>
<?php
$a = 20;
$b = 20;
if($a == $b)
{
echo "same";
}
else
{
echo "note same";
}
?>
</body>
</html>

The output of the above code
same

No comments: