Working on a count sorted array
<p>I'm trying to figure out how I can work on an array sorted this way:</p>

<pre><code>$countValues = array_count_values($someArray);
arsort($someArray);
</code></pre>

<p>I want to find the first value of the sorted array that abide some criterias. Say for example,  you have an array with bananas, apples and tea. I want to find the most representative member of the array that isn't an apple. So if we have the array:</p>

<p>[apple, banana, apple, banana, tea]</p>

<p>after being sorted it would turn out to be this:</p>

<p>( [apple] => 2 [banana] => 2 [tea] => 1 )</p>

<p>So how do I find the most represented value that isn't an apple. Hope you can follow.</p>

<p>Thanks.</p>
