2
I have the array
$vetor[0]['codigo'] = '1';
$vetor[0]['valor'] = '4';
$vetor[1]['codigo'] = '1';
$vetor[1]['valor'] = '2';
$vetor[2]['codigo'] = '2';
$vetor[2]['valor'] = '2';
I need to merge all values with equal codes. Making the above example look like this:
Code 1 is set to 6
And code 2 is set to 2
Does anyone have any idea how to do that?
vc speaks sum the values $vector[n]['code] to get only one with the total?
– Wees Smith
To merge all values with equal code
– Paulo Roberto