$v) { $temp[] = $v; } } return $temp; } echo '
'; print_r(array_map('merge_arrays_by_index',$array2, $array1)); ?>