number_format
| From: | Juzan Jean-Michel | Date: | Fri, 07 Mar 2003 20:52:33 +0000 |
| Subject: | number_format | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8484@lists.php.net to get a copy of this message | ||
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
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc