I have a variable for example $attribute which has the set of arrays that has same keys but different values which i want to merge as to have one key and pair it with all the values
Array
(
[color] => #11f7d8
)
Array
(
[color] => #75e3ff
)
Array
(
[color] => #acff7c
)
Array
(
[color] => #e996fa
)
Array
(
[size] => s
)
the output of the above input should be as below, how to i do that
Array
(
'color' => ['#11f7d8','#75e3ff','#acff7c','#e996fa'],
'size' => ['s']
)