Good morning, I have the following array:
Array ( [0] => Array( [data] => 2018-06-08
[grupo] => 1
[maq] => 1
[segundos] => 10089 )
[1] => Array ( [data] => 2018-06-08
[grupo] => 1
[maq] => 2
[segundos] => 6300 )
[2] => Array ( [data] => 2018-06-08
[grupo] => 1
[maq] => 1
[segundos] => 3600 )
[3] => Array ( [data] => 2018-06-09
[grupo] => 1
[maq] => 1
[segundos] => 3600 ) )
My question is as follows, how can I add only the key, where the key [date] and [maq] were the same (repeat), like the following output:
Array ( [0] => Array( [data] => 2018-06-08
[grupo] => 1
[maq] => 1
[segundos] => 13689 )
[1] => Array ( [data] => 2018-06-08
[grupo] => 1
[maq] => 2
[segundos] => 6300 )
[2] => Array ( [data] => 2018-06-09
[grupo] => 1
[maq] => 1
[segundos] => 3600 ) )