3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arrStart = [ 0 => [ "start" => "04/26/2015 8:00 AM", ], 1 => [ "start" => "04/26/2015 9:00 AM", ], ]; $arrEnd = [ 0 => [ "end" => "04/26/2015 10:00 AM", ], 1 => [ "end" => "04/26/2015 11:00 AM", ], ]; $keys = [ 0 => "1", 1 => "3", ]; $result = []; foreach ($keys as $i => $key) { $result[$key] = [ 'start' => $arrStart[$i][0], 'end' => $arrEnd[$i][0], ]; } var_dump($result);
based on mfZ1s