3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Your code here! $arr = [ "txt_job_exp_start" => [ 0 => "2019-03", 1 => "2018-12", 2 => "2017-12" ], "txt_job_exp_end" => [ 0 => "2020-02", 1 => "2019-11", 2 => "2018-08" ], "txt_job_exp_desc" => [ 0 => "Description 1", 1 => "Description 2", 2 => "Description 3" ] ]; $arr2 = []; foreach($arr as $key => $val){ $arr2[] = $val; } var_dump($arr2); ?>
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
array(3) { [0]=> array(3) { [0]=> string(7) "2019-03" [1]=> string(7) "2018-12" [2]=> string(7) "2017-12" } [1]=> array(3) { [0]=> string(7) "2020-02" [1]=> string(7) "2019-11" [2]=> string(7) "2018-08" } [2]=> array(3) { [0]=> string(13) "Description 1" [1]=> string(13) "Description 2" [2]=> string(13) "Description 3" } }

preferences:
190.37 ms | 408 KiB | 5 Q