php logical operator comparison evaluation
<p>here is what i'm trying to achieve:  </p>

<blockquote>
  <p>if $x is either of these 3 values: 100, 200 or 300 - do something</p>
</blockquote>

<p>I'm doing this:  </p>

<pre><code>if($x==("100"||"200"||"300"))  
{  
  //do something  
}
</code></pre>

<p>but <code>//do something</code> is executed even if <code>$x</code> is <code>400</code></p>

<p>I noticed that this works:  </p>

<pre><code>if($x=="100"||$x=="200"||$x=="300")  
{  
  //do something  
} 
</code></pre>

<p>How is the first block of code different from the second block of code? What am I doing wrong?</p>
