- array_map: documentation ( source)
- print_r: documentation ( source)
<?php
$a = [
[
"id" => 1234,
"name" => "John"
],
[
"id" => 1235,
"name" => "doe"
]
];
$b =
[
[
"age" => 12
],
[
"age" => 13
]
];
$c = array_map('array_merge', $a, $b);
print_r($c);