fnum.php 353 B

1234567891011
  1. <?php
  2. /*
  3. $lc must be a variable that was set using the localeconv() function.
  4. The locale must be correctly set with setlocale to an actually available
  5. locale before using localeconv() and this function.
  6. */
  7. function fnum($num,$lc,$dec=0) {
  8. if (is_null($num)) return null;
  9. return number_format($num,$dec,$lc['decimal_point'],$lc['thousands_sep']);
  10. }
  11. ?>