title: Re-arrange array to combine overlapping results
body: <p>I'm using datetime to store dates of when new data is entered per provider.  Using the following query to pull the results:</p>
  
  <pre><code>SELECT COUNT(id) AS addedCount,
  date(date_added) AS dateAdded,
  provider_name as provider 
  FROM `table` WHERE `table`.`id` IN (SELECT `table`.`id` FROM `table` 
  WHERE     `table`.`active` = '1') 
  
  GROUP BY dateAdded
  ORDER BY dateAdded DESC
  </code></pre>
  
  <p>The array looks like this:</p>
  
  <pre><code>array(1343) {
      [0]=&gt;
      array(3) {
          ["addedCount"]=&gt;
          string(1) "2"
          ["dateAdded"]=&gt;
          string(10) "2012-03-03"
          ["provider"]=&gt;
          string(5) "Provider_1"
      }
      [1]=&gt;
      array(3) {
          ["addedCount"]=&gt;
          string(1) "1"
          ["dateAdded"]=&gt;
          string(10) "2012-03-03"
          ["provider"]=&gt;
          string(5) "Provider_1"
     }
    [2]=&gt;
    array(3) {
        ["addedCount"]=&gt;
        string(1) "1"
        ["dateAdded"]=&gt;
        string(10) "2012-03-03"
        ["provider"]=&gt;
        string(5) "Provider_2"
     }
    [3]=&gt;
    array(3) {
        ["addedCount"]=&gt;
        string(1) "1"
        ["dateAdded"]=&gt;
        string(10) "2012-03-03"
        ["provider"]=&gt;
        string(5) "Provider_2"
  </code></pre>
  
  <p>I need the results to count the total of "addedCount" where "dateAdded" and "provider" match so that the final array looks like:</p>
  
  <pre><code>addedCount  dateAdded   provider
  3           2012-03-03  provider_1
  2           2012-03-03  provider_2
  </code></pre>
  
  <p>I've tried tirelessly searching SO and rebuilding the arrays, but after many hours spent, I ended up rebuilding the array in its original form,</p>
  
  <p>Thank you in advance!</p>