15
I created a function cotacaoDolar();
who returns at the end:
return str_replace(",",".",$texto_dolar);
And the result, appears here:
echo $i['sellingStatus'][0]['currentPrice'][0]['__value__'] * cotacaoDolar();
How do I format the value (['__value__']
) quoted above?
It’s like this: R$ 271.309389 ou R$ 1119.2445
The right thing would be: R$ 271,30 ou R$ 1.119,24
Beauty, it worked like this: $value = $i['sellingStatus'][0]['currentPrice'][0]['value'] * cotacaoDolar(); echo number_format($value,2,",",".");
– GustavoCave