>Array
>(
>> [valor_pago_total] => Array
>>> (
>>>> [0] => 14.750.861,55
>>>> [1] => 20.828.923,13
>>>> [2] => 18.431.681,20
>>>> [3] => 43.403.452,99
>>>> [4] => 19.177.285,19
>>>> [5] => 30.213.514,73
>>>> [6] => 5.296.079,04
>>>> [7] => 875.873,76
>>>> [8] => 254.810,00
>>>)
>>)
Why I execute array_sum($valor_pago_total), I get a wrong result. Why?
Get rid of the periods by replacing them with nothing, and make the commas into a period to make
array_sum()work. Then usenumber_format()to turn it back into your formatted result.Note that the result will need a 64-bit machine.
This outputs: