0
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 the following, how can I add only the key[seconds], where the key [date] and [maq] were the same (repeat), as 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 ) )