<?php $arr1 = [ ['A', 'B', 'C'], ['F', 'G'] ]; $arr2 = [ ['D', 'E'], ['H', 'I', 'J', 'L'] ]; foreach ($arr1 as $i => &$row) { array_push($row, ...$arr2[$i]); } var_export($arr1);
You have javascript disabled. You will not be able to edit any code.