title: SUM value in array PHP
body: <p>I have a problem with array. I want to sum up the given quantities (qty).</p>
  
  <p>I want to get:</p>
  
  <p>blyszczaca Normal = 6;</p>
  
  <p>czapkoszal Normal = 6;</p>
  
  <p>czapkoszal Luxury = 2;</p>
  
  <p>etola Wolf = 1;</p>
  
  <p>etola Normal = 2;</p>
  
  <p>from this array. Can you help me please? I think about it for the last 4 hours and nothing. Still learning.</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [produkt] =&gt; blyszczaca
              [model] =&gt; Normal
              [price] =&gt; 27.00
              [qty] =&gt; 2
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; blyszczaca
              [1] =&gt; Normal
              [2] =&gt; 27.00
              [3] =&gt; 2
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; blyszczaca
              [1] =&gt; Normal
              [2] =&gt; 27.00
              [3] =&gt; 2
          )
  
      [3] =&gt; Array
          (
              [0] =&gt; czapkoszal
              [1] =&gt; Normal
              [2] =&gt; 41.00
              [3] =&gt; 2
          )
  
      [4] =&gt; Array
          (
              [0] =&gt; czapkoszal
              [1] =&gt; Luxury
              [2] =&gt; 45.00
              [3] =&gt; 2
          )
  
  
      [5] =&gt; Array
          (
              [0] =&gt; czapkoszal
              [1] =&gt; Normal
              [2] =&gt; 41.00
              [3] =&gt; 2
          )
  
      [6] =&gt; Array
          (
              [0] =&gt; czapkoszal
              [1] =&gt; Normal
              [2] =&gt; 41.00
              [3] =&gt; 1
          )
  
      [7] =&gt; Array
          (
              [0] =&gt; czapkoszal
              [1] =&gt; Normal
              [2] =&gt; 41.00
              [3] =&gt; 1
          )
  
      [8] =&gt; Array
          (
              [0] =&gt; etola
              [1] =&gt; Wolf
              [2] =&gt; 47.00
              [3] =&gt; 1
          )
  
      [9] =&gt; Array
          (
              [0] =&gt; etola
              [1] =&gt; Normal
              [2] =&gt; 39.00
              [3] =&gt; 1
          )
  
      [10] =&gt; Array
          (
              [0] =&gt; etola
              [1] =&gt; Normal
              [2] =&gt; 39.00
              [3] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>Thank you.</p>