What is difference between if($a) and if($a==1)?
<pre><code>    function foo($a)
    { 
      if($a) {return "a";}
      else if($a==2) {return "b";}
      else {return "c";}
     }

     -----------------------------------------

     function foo2($a)
     {
       if($a==1){return "a";}
       if($a==2){return "b";}
       if($a==3){return "c";}

     }
</code></pre>

<p>when i passed value any number frim 1,2 or 3 ? it will return 1. when i pass value in function foo2 it will return value as value passed .</p>

<p>But why is difference coming ?</p>
