PHP » Operators » ==

Syntax:
expression1 == expression2
expression1
An expression.
expression2
Another expression to compare it to.

Equality.

This comparison operator returns TRUE if the first expression is equal in value to the second. The two expressions or variables do not have to be of the same type. It is important not to mix this operator up with the assignment operator "=".

Examples

Code:
<?php

if ("5" == 5)
   print "\"5\" is equal to 5";

?>
Output:
"5" is equal to 5
Explanation:

Even though the two expressions are of different types, they are considered equal.