title: Group array data on one column and sum data from another column
body: <p>I have my array data as shown below:</p>
  <pre><code>$array = [
      ['name' =&gt; 'Bank BRI', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank BRI', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank BCA', 'amount' =&gt; 1412341234],
      ['name' =&gt; 'Bank CIMB Niaga', 'amount' =&gt; 532532552], 
      ['name' =&gt; 'Bank BRI', 'amount' =&gt; 34534534], 
      ['name' =&gt; 'Bank CIMB Niaga', 'amount' =&gt; 453425243], 
      ['name' =&gt; 'Bank BRI', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank BNI', 'amount' =&gt; 124124], 
      ['name' =&gt; 'Bank CIMB Niaga', 'amount' =&gt; 352345623], 
      ['name' =&gt; 'Bank BCA', 'amount' =&gt; 23432423], 
      ['name' =&gt; 'Bank Mandiri', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank BCA', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank BCA', 'amount' =&gt; 0], 
      ['name' =&gt; 'Bank Permata', 'amount' =&gt; 352352353],
  ];
  </code></pre>
  <p>How to sum 'amount' based on same 'bank name'.</p>
  <p>My result should show grouped names and their summed amount:</p>
  <pre><code>array (
    'Bank BRI' =&gt; 34534534,
    'Bank BCA' =&gt; 1435773657,
    'Bank CIMB Niaga' =&gt; 1338303418,
    'Bank BNI' =&gt; 124124,
    'Bank Mandiri' =&gt; 0,
    'Bank Permata' =&gt; 352352353,
  )
  </code></pre>