Re: [SMARTY] number_format

From: Date: Sat, 08 Mar 2003 02:02:49 +0000
Subject: Re: [SMARTY] number_format
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8485@lists.php.net to get a copy of this message
Also already posted at: http://smarty.php.net/contribs/plugins/view.php/modifier.number_format.php except with defaults for decimal point and thousands seperator. ----- Original Message ----- From: "Juzan Jean-Michel" <jmj@ecreasol.ch> To: "Smarty General" <smarty-general@lists.php.net> Sent: Friday, March 07, 2003 2:52 PM Subject: [SMARTY] number_format To format number, I hope this help I have found money_format function but it only available in PHP 4 >= 4.3.0 <?php /* * Smarty plugin * ------------------------------------------------------------- * Type: modifier * Name: number_format * Purpose: format numbers via number_format # For more information http://www.php.net/manual/en/function.number-format.php * ------------------------------------------------------------- */ function smarty_modifier_number_format($number, $decimals=2, $dec_point=".", $thousands_sep="'") { return number_format($number, $decimals, $dec_point, $thousands_sep); } /* vim: set expandtab: */ ?> -- Jean-Michel Juzan jmjuzan@ecreasol.ch Direction Informations & Technologies eCreaSol - NetWork Creative Solutions SARL - http://www.ecreasol.ch/ PGP public keys server : http://www.keyserver.net

« previous php.smarty.general (#8485) next »