- var_dump: documentation ( source)
- array_reduce: documentation ( source)
<?php
$arrays = [
[
"a1" => true,
"b1" => "abc",
"c1" => "def"
],
[
"a2" => true,
"b2" => "fgh",
"c2" => "ijk",
"d2" => "lmn",
"e2" => "opq"
]
];
$result = array_reduce($arrays, function ($carry, $item) {
$carry += $item;
return $carry;
}, []);
var_dump($result);