title: Associative Array, find duplicates in values
body: <p>The array that I use is an array merged from three different arrays (3 different mysql results). Each array is an associative array with a few fields and the <code>count</code> field is the field I need. </p>
  
  <p>The following piece of array is a double entry. I want to check the array and check if there are duplicates (<code>id</code> field) and calculate the sum of the count field. What would be the best-practice to solve this issue?</p>
  
  <pre><code>array(21) {
  [2] =&gt; array(6) {
    ["id"] =&gt; string(2) "71"
    ["artist"] =&gt; string(7) "Arsenal"
    ["title"] =&gt; string(10) "Oyebo Soul"
    ["genres_id"] =&gt; string(2) "13"
    ["mbid"] =&gt; string(36) "0048d294-1557-4e05-8c82-8bc3f8f11923"
    ["count"] =&gt; string(1) "4"
  }
  [3] =&gt; array(6) {
    ["count"] =&gt; string(1) "3"
    ["id"] =&gt; string(2) "71"
    ["artist"] =&gt; string(7) "Arsenal"
    ["title"] =&gt; string(10) "Oyebo Soul"
    ["genres_id"] =&gt; string(2) "13"
    ["mbid"] =&gt; string(36) "0048d294-1557-4e05-8c82-8bc3f8f11923"
  }
  </code></pre>
  
  <p>The result would be this:</p>
  
  <pre><code>[3] =&gt; array(6) {
    ["count"] =&gt; string(1) "7"
    ["id"] =&gt; string(2) "71"
    ["artist"] =&gt; string(7) "Arsenal"
    ["title"] =&gt; string(10) "Oyebo Soul"
    ["genres_id"] =&gt; string(2) "13"
    ["mbid"] =&gt; string(36) "0048d294-1557-4e05-8c82-8bc3f8f11923"
  }
  </code></pre>
  
  <p>Hope this makes any sense. Thanks in advance</p>