title: How can I sum array values by unique key?
body: <p>For example</p>
  
  <pre><code>array (
  product1_quantity =&gt; 5,
  product1_quantity =&gt; 1,
  product2_quantity =&gt; 3,
  product2_quantity =&gt; 7,
  product3_quantity =&gt; 2,
  )
  </code></pre>
  
  <p>with result:</p>
  
  <pre><code>product1_quantity - 6, 
  product2_quantity - 10, 
  product3_quantity - 2
  </code></pre>
  
  <p>Thanx!</p>
  
  <hr>
  
  <p>sorry, guys</p>
  
  <p>stupid example, instead this really</p>
  
  <p>Array ( [0] => Array ( [product1] => 7 ) 
  [1] => Array ( [product1] => 2 ) 
  [2] => Array ( [product2] => 3 )
  )</p>
  
  <p>?</p>