PHP if condition number issue : <p>The php code is returing true in both cases show below. I dont know why?</p>

<pre><code>&lt;?php

$cid = 150;

if ($cid=100)
{
echo $cid;
echo "&lt;BR&gt;";
}

if ($cid==100)
{
echo "NEW";
echo "&lt;BR&gt;";
echo $cid;
echo "&lt;BR&gt;";
}

?&gt;
</code></pre>

<p>The output is: <BR>
100<BR>
NEW<BR>
100<BR></p>

<p><BR>Why is the if condition not working?</p>
