What is a clever way to count number of unique items in array (PHP)?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1553809/unique-entries-in-an-array">Unique entries in an array</a>  </p>
</blockquote>



<p>Let assume the array is sorted, how can I get number of counts for each unique items</p>

<p>Example:</p>

<pre><code>  $array = array ("bye", "bye", "bye", "hello", "hello");
</code></pre>

<p>Output:</p>

<pre><code>    bye   = 3
    hello = 2 
</code></pre>
