title: Count by grouping Multidimensional arrays in PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2189626/php-how-to-group-a-multidimensional-array-by-a-particular-value">php how to group a multidimensional array by a particular value?</a><br>
    <a href="https://stackoverflow.com/questions/5269188/php-group-by-sum-using-multi-dimensional-array">php group by SUM using multi dimensional array</a>  </p>
  </blockquote>
  
  
  
  <p>I need some help in getting the count of the array element quantity by grouping it based on a date value part of a Multidimensional array in php</p>
  
  <p>Here's my original array</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [quantity] =&gt; 5
          [dd] =&gt; 01-Nov-2012
      )
  
  [1] =&gt; Array
      (
          [quantity] =&gt; 10
          [dd] =&gt; 01-Nov-2012
      )
  
  [2] =&gt; Array
      (
          [quantity] =&gt; 3
          [dd] =&gt; 02-Nov-2012
      )
  
  [3] =&gt; Array
      (
          [quantity] =&gt; 4
          [dd] =&gt; 03-Nov-2012
      )
  
  [3] =&gt; Array
      (
          [quantity] =&gt; 15
          [dd] =&gt; 03-Nov-2012
      )
  )
  </code></pre>
  
  <p>And this is the Output I'm expecting</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [quantity] =&gt; 15
          [dd] =&gt; 01-Nov-2012
      )
  
  [1] =&gt; Array
      (
          [quantity] =&gt; 3
          [dd] =&gt; 02-Nov-2012
      )
  
  [2] =&gt; Array
      (
          [quantity] =&gt; 19
          [dd] =&gt; 03-Nov-2012
      )
  )
  </code></pre>