comparing multiple data in php?
<p>how can i compare multiple data using php</p>

<p>for example i have a variable $foo , the data assigned to it varies . if there are four different data can be assigned to variable $foo , like :" car , van,bus or bicycle"</p>

<p>how can i use the if statement to check which data is assigned to $foo?</p>

<p>normally if i have two data i will use </p>

<pre><code>if($foo == 'firstdata'){
   //execute something as this is the first data
}
else{
   //this is the second data!
}
</code></pre>

<p>if there's 3 data i will use elseif statement.</p>

<p>but now 4 data , what can i use ? or can i use elseif as many times as i want??</p>
