3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_array=array(array('month'=> 3, 'day'=> 4, 'hour' => 1, 'minut' => 15, 'year'=> 2014), array('month'=> 5, 'day'=> 7, 'hour' => 1, 'minut' => 50, 'year'=> 2012) ); $i=0; foreach($my_array as $k => $v) { $new_array[$i] = $v["year"]."-".$v["month"]."-".$v["day"]." ".$v["hour"].$v["minut"]; $i++; } print_r($new_array);
Output for 4.3.0 - 7.1.0
Array ( [0] => 2014-3-4 115 [1] => 2012-5-7 150 )