Testing multiple values efficiently in PHP
<p>Okay, so I have a few possible matches that I need to test. It can either equal <strong>A</strong> or <strong>B</strong>, so the obvious way to test it would be something like this:</p>

<pre><code>if($val=="A"||$val="B"){
    echo "yup";
}
</code></pre>

<p>I was just wondering if their were an easier way to test values without restating the variable for every value, like this (I know this doesn't work):</p>

<pre><code>if($val==("A"||"B")){
    echo "yuppers";
}
</code></pre>

<p>Is something like this possible?</p>
