= is the assignment operator. It's used to assign a value to a variable, for example:
Code:
$bar = 1337;
$foo = $bar;
It returns the value that was assigned to the variable on the left, so the following code has the same effect:
== is the comparison operator. It's used to compare two values, and returns
true if they are equal,
false otherwise, for example:
Code:
$boolean = $foo == $bar; // $boolean is set to true if $foo and $bar are equal
if ($foo == $bar)
{
// do something
}