/add-ons/smarty/plugins/modifier.number_format.php
PHP | 25 lines | 7 code | 2 blank | 16 comment | 1 complexity | fcd8b191100ed8ab5b761a22d2cc539d MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, GPL-3.0, Apache-2.0, BSD-3-Clause
- <?php
- /*
- * Smarty plugin
- *
- -------------------------------------------------------------
- * File: modifier.number_format.php
- * Type: modifier
- * Name: number_format
- * Version: 1.0
- * Date: May 1st, 2002
- * Purpose: pass value to PHP number_format() and return result
- * Install: Drop into the plugin directory.
- * Author: Jason E. Sweat <jsweat_php@yahoo.com>
- *
- -------------------------------------------------------------
- */
- function smarty_modifier_number_format($string, $places=2, $dec=",", $thoussep=" ")
- {
- if (!$string) return $string;
- return number_format($string, $places, $dec, $thoussep);
- }
- /* vim: set expandtab: */
- ?>