title: PHP - count unique arrays
body: <pre><code>Array ( 
   [0] =&gt; Array ( [0] =&gt; b [1] =&gt; d)  
   [1] =&gt; Array ( [0] =&gt; c [1] =&gt; a) 
   [2] =&gt; Array ( [0] =&gt; b [1] =&gt; d)
   [3] =&gt; Array ( [0] =&gt; a [1] =&gt; d)
   [4] =&gt; Array ( [0] =&gt; c )
   [5] =&gt; Array ( [0] =&gt; a [1] =&gt; d [2] =&gt; e)
   [6] =&gt; Array ( [0] =&gt; d [1] =&gt; b)
   )
  </code></pre>
  
  <p>I would like to perform a count on unique inner arrays, so I can get a count similar to:</p>
  
  <p>2 of b,d</p>
  
  <p>1 of c,a</p>
  
  <p>1 of a,d</p>
  
  <p>1 of c</p>
  
  <p>1 of a,d,e</p>
  
  <p>1 of d,b</p>
  
  <p>I looked at "implode" function, but I only get a listing of all values in the inner arrays instead of a count. </p>
  
  <pre><code>foreach ($result_array as &amp;$pair) 
      {
      $pair = implode(', ', $pair);
      }
  </code></pre>