title: how to put each element into array separately that is already inside an array in php
body: <p>I have some data basically what i want to do is to put each element inside it into an array separately</p>
  
  <pre><code>array (size=4112)
    'new Date('2018-09-22 00:00:11')' =&gt; float 22.2148
    'new Date('2018-09-22 00:00:33')' =&gt; float 22.2154
    'new Date('2018-09-22 00:00:55')' =&gt; float 22.2094
    'new Date('2018-09-22 00:01:16')' =&gt; float 22.1987
    'new Date('2018-09-22 00:01:35')' =&gt; float 22.2005
    'new Date('2018-09-22 00:01:43')' =&gt; float 22.1914
    'new Date('2018-09-22 00:01:59')' =&gt; float 22.2025
    'new Date('2018-09-22 00:02:20')' =&gt; float 22.1882
    'new Date('2018-09-22 00:02:54')' =&gt; float 22.1864
             ....
  </code></pre>
  
  <p>How can i put each 'new Date('2018-09-22 00:00:11')' => float 22.2148 into another array in php?</p>
  
  <p>This was code</p>
  
  <pre><code>foreach($unitTelemetryData1 as $device) {
      array_shift($device);//RemoveTimeSTAMP
      foreach($device as $key =&gt; $value)
      {
          //echo $key ." ".$value;
          $tempX = array_column($unitTelemetryData1,$key,$TimeStamp);
          array_push($result,$tempX);
  
      }
      break;
  }
  
  //var_dump($result);
  //die();
  
  
  foreach($result as $r)
  {
  
      $result1 = array('series'=&gt;array('name' =&gt; $serial, 'data' =&gt; $r));
      array_push($result2,$result1);
      //break;
  }
  </code></pre>
  
  <p>see last foreach $r does contain key and value</p>