PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/include/plugins/modifier.number_format.php

https://github.com/munin/froglet
PHP | 48 lines | 6 code | 5 blank | 37 comment | 0 complexity | 78571907ebfbeeb925215dcef651a2e8 MD5 | raw file
  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Smarty number_format modifier plugin
  9. *
  10. * Type: modifier<br>
  11. * Name: number_format<br>
  12. * Purpose: format number via number_format
  13. * @link http://smarty.php.net/manual/en/language.modifier.number.format.php
  14. * number_format (Smarty online manual)
  15. * @param string
  16. * @param integer
  17. * @param character
  18. * @param character
  19. * @return string
  20. */
  21. function smarty_modifier_number_format($number, $decimals="2", $decpoint=".", $thousandsep=",")
  22. {
  23. return number_format($number, $decimals, $decpoint, $thousandsep);
  24. }
  25. /* vim: set expandtab: */
  26. ?>