title: How to combine array value with same key?
body: <p>So i have this array that i get from query. The array look like this when i <code>print_r</code></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Name] =&gt; NAME 1
              [Last] =&gt; LastValue1
              [Bid] =&gt; 
              [Ask] =&gt; 
          )
  
      [1] =&gt; Array
          (
              [Name] =&gt; NAME 1
              [Last] =&gt; 
              [Bid] =&gt; BidValue1
              [Ask] =&gt; 
          )
  
      [2] =&gt; Array
          (
              [Name] =&gt; Name 2
              [Last] =&gt; LastValue2
              [Bid] =&gt; BidValue2
              [Ask] =&gt;
          )
      [3] =&gt; Array
      (
          [Name] =&gt; NAME 1
          [Last] =&gt; 
          [Bid] =&gt; 
          [Ask] =&gt; AskValue1
      )
      [4] =&gt; Array
      (
          [Name] =&gt;Name 2
          [Last] =&gt; 
          [Bid] =&gt; 
          [Ask] =&gt; AskValue2
      )
  
  )
  </code></pre>
  
  <p>and i want to achieve array looks like this</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Name] =&gt; NAME 1
              [Last] =&gt; LastValue1
              [Bid] =&gt; BidValue1
              [Ask] =&gt; AskValue1
          )
  
      [2] =&gt; Array
          (
              [Name] =&gt; Name 2
              [Last] =&gt; LastValue2
              [Bid] =&gt; BidValue2
              [Ask] =&gt; AskValue2
          )
  
  )
  </code></pre>
  
  <p>I try this way (get it from google)</p>
  
  <pre><code>$result = array();
  foreach ($newArray as $element) {
      $result[$element['Name']][] = $element;
  }
  
  echo "&lt;pre&gt;";print_r($result);
  </code></pre>
  
  <p>But it is not showing the result that i want. How can i achieve it ? 
  thanks in advance and sorry for my english</p>