title: Array Index merge of the same array
body: <p>I have faced a problem. I have an array looks like this</p>
  
  <pre><code>print_r($log_ret_val);
  Array ( [0] =&gt; Array ( [0] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO ) ) 
                         [1] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO ) ) 
        ) 
          [1] =&gt; Array ( [0] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Tempin] =&gt; 29 ) ) 
                         [1] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Tempin] =&gt; 29 ) ) 
        ) 
          [2] =&gt; Array ( [0] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Date_time] =&gt; 18.11.2017 11:03:33 ) ) 
                         [1] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Date_time] =&gt; 18.11.2017 11:00:31 ) ) 
       ) 
  )
  </code></pre>
  
  <p>And this is what I write for that value</p>
  
  <pre><code>$log_val        = array();
  foreach ($log_ret_val as $key =&gt; $valuee) {
      foreach ($valuee as $key =&gt; $val) {
          array_push($log_val,$val);
      }
  }
  print_r($log_val);
  
  Array ( [0] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO ) ) 
          [1] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO ) ) 
          [2] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Tempin] =&gt; 29 ) )                   
          [3] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Tempin] =&gt; 28 ) ) 
          [4] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Date_time] =&gt; 18.11.2017 11:24:45 ) ) 
          [5] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Date_time] =&gt; 18.11.2017 11:21:43 ) ) 
  )
  </code></pre>
  
  <p>But my desired output looks like this</p>
  
  <pre><code>Array ( [0] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO [Tempin] =&gt; 29 [Date_time] =&gt; 18.11.2017 11:24:45 ) ) 
          [1] =&gt; Array ( [TestingLogDevice] =&gt; Array ( [Siteid] =&gt; Mirpur_CO [Tempin] =&gt; 28 [Date_time] =&gt; 18.11.2017 11:21:43 ) ) 
  )
  </code></pre>
  
  <p>So what can I do meet up my desired output. For your kind suggestion or help please </p>