I\'m working on upgrading a legacy system from PEAR\'s i18nv2 class to PHP\'s built-in INTL library. When I specify a pattern like #,##0.## and run Number
#,##0.##
Number
http://icu-project.org/apiref/icu4c/classDecimalFormatSymbols.html
Symbol Meaning 0 a digit # a digit, zero shows as absent
So:
$n = new NumberFormatter('en_CA', NumberFormatter::PATTERN_DECIMAL, '#,##0.00'); echo $n->format(12345.10000);
Yields:
12,345.10