1
Good use of php’s Numberformatter library to work with conversion, but I’m having a problem converting numbers with many digits after the .
Example:
$valores = '54.98054562';
$moeda1 = new NumberFormatter('pt_BR', NumberFormatter::DECIMAL);
$moeda1->setAttribute( NumberFormatter::MIN_FRACTION_DIGITS, 2);
$valores = $moeda1->formatCurrency($valores, 'BRL');
echo $valores;
He returns me 54,981 and I need you to return 54,98.
Someone knows how to fix this?
thank you very much ;)
– Hugo Borges