Array
(
[0] => Array
(
[employee] => 15
[first_name] => Person1
[surname] => Person1
[totaltime] => 183.75
[FirstValue] => 1
)
[1] => Array
(
[employee] => 15
[first_name] => Person1
[surname] => Person1
[totaltime] => 183.75
[SecondValue] => 2
)
)
I want output like this
Array
(
[0] => Array
(
[employee] => 15
[first_name] => Person1
[surname] => Person1
[totaltime] => 183.75
[FirstValue] => 1
[SecondValue] => 2
)
)
I have a multi-dimensional array. Each element has an employee as key which can be the same or different. I want to merge the arrays with the same EmployeeID
. Also 2 same employee may have different elements like FirstValue
,SecondValue
, etc. I want to merge unique element as I've show in the above output.