I have a multidimensional array that looks like this:
array (size=2)
0 =>
array (size=3)
'a1' => boolean true
'b1' => string 'abc' (length=6)
'c1' => string 'def' (length=8)
1 =>
array (size=5)
'a2' => boolean true
'b2' => string 'fgh' (length=6)
'c2' => string 'ijk' (length=8)
'd2' => string 'lmn' (length=4)
'e2' => string 'opq' (length=4)
And my goal is to get this:
array (size=8)
'a1' => boolean true
'b1' => string 'abc' (length=6)
'c1' => string 'def' (length=8)
'a2' => boolean true
'b2' => string 'fgh' (length=6)
'c2' => string 'ijk' (length=8)
'd2' => string 'lmn' (length=4)
'e2' => string 'opq' (length=4)
I've tried something with the array_map function but I don't know how to get all fields:
$params = array_map(function($element) {
return $element['a1'];
}, $params);