title: How to summary same value in array using PHP?
body: <p>I have an array like this:</p>
  <pre><code>Array (
      [0] =&gt; Array
          (
              [code] =&gt; Red Rose
              [info] =&gt; 2
          )
  
      [1] =&gt; Array
          (
              [code] =&gt; Lily Flower
              [info] =&gt; 1
          )
  
      [2] =&gt; Array
          (
              [code] =&gt; Lily Flower
              [info] =&gt; 4
          )
  
      [3] =&gt; Array
          (
              [code] =&gt; Lily Flower
              [info] =&gt; 2
          )
  )
  </code></pre>
  <p>I need my result to be like:</p>
  <blockquote>
  <p>Red Rose (2)</p>
  </blockquote>
  <blockquote>
  <p>Lily Flower (7)</p>
  </blockquote>
  <p>I have been trying to use foreach, but with no success.</p>
  <pre><code>foreach($array as $rowjb):
     echo $rowjb['code'].&quot; (&quot;.$rowjb['info'].&quot;) &lt;/br&gt;&quot;;
  endforeach;
  
  </code></pre>
  <pre><code>Red Rose (2)
  Lily Flower (1)
  Lily Flower (4)
  Lily Flower (2)
  </code></pre>