note 26227 deleted from function.number-format by nicos
| From: | nicos@php.net | Date: | Sun, 27 Jul 2003 19:50:13 +0000 |
| Subject: | note 26227 deleted from function.number-format by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52799@lists.php.net to get a copy of this message | ||
Note Submitter: bart.lateur@pandora.be
----
I can't understand why number_format() doesn't honour locale. Oh well, here's an idea
for a function you could use.
function number_format_locale ($num, $decimals = null) {
$locale = localeconv();
if(!isset($decimals)) $decimals = $locale['frac_digits'];
return number_format($num, $decimals, $locale['decimal_point'],
$locale['thousands_sep']);
}