I have the following code:
$a = array('a' => 'some value', 'b' => 'some value', 'c' => 'some value');
$b = array('a' => 'another value', 'd' => 'another value', 'e' => 'another value', 'f' => 'another value');
$c = array('b' => 'some more value', 'x' => 'some more value', 'y' => 'some more value', 'z' => 'some more value');
$d = array($a, $b, $c);
var_export($d)
will output:
array (
0 =>
array (
'a' => 'some value',
'b' => 'some value',
'c' => 'some value',
),
1 =>
array (
'a' => 'another value',
'd' => 'another value',
'e' => 'another value',
'f' => 'another value',
),
2 =>
array (
'b' => 'some more value',
'x' => 'some more value',
'y' => 'some more value',
'z' => 'some more value',
),
)
How would I go about combining the array keys and end up with the following output?
Array
(
[0] => Array
(
[a] => some value
[b] => some value
[c] => some value
[d] =>
[e] =>
[f] =>
[x] =>
[y] =>
[z] =>
)
[1] => Array
(
[a] => another value
[b] =>
[c] =>
[d] => another value
[e] => another value
[f] => another value
[x] =>
[y] =>
[z] =>
)
[2] => Array
(
[a] =>
[b] => some more value
[c] =>
[d] =>
[e] =>
[f] =>
[x] => some more value
[y] => some more value
[z] => some more value
)
)