PHP Identifying First Data of An Array Using For Each Loop
<p>Let's say I have this array :</p>

<pre><code>$cars = array("Saab","Volvo","BMW","Toyota");
</code></pre>

<p>and I also have this Foreach loop to 'manipulate' that array :</p>

<pre><code>foreach ($cars as $carsdata) 
    { 
        if (*this is array[0]) {
            do something here
        }else if (*array[1] ... array[x]){
            do another thing here
        }        
    }
</code></pre>

<p>any idea how to write that Foreach correctly? thanks.</p>
