Re: [SMARTY] number_format
| From: | Juzan Jean-Michel | Date: | Sat, 08 Mar 2003 02:39:47 +0000 |
| Subject: | Re: [SMARTY] number_format | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8486@lists.php.net to get a copy of this message | ||
Le sam 08/03/2003 à 03:02, Jason Sweat a écrit :
> 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.
Hi Jason,
Can you update your post with decimal point and thousands seperator ?
In switzerland we use decimal point "." and thousands seperator " "
In france we use decimal point "," and thousands seperator " "
Regards.
>
> ----- 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
--
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