modifier.number_format.php 643 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?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,$decimales=2)
{
    $aux=ereg_replace(',','',$string);
    return number_format($string, $decimales,'.',',');
}

/* vim: set expandtab: */

?>