Re: number_format should be standard smarty modifier
| From: | pete M | Date: | Fri, 08 Oct 2004 13:20:12 +0000 |
| Subject: | Re: number_format should be standard smarty modifier | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11863@lists.php.net to get a copy of this message | ||
I agree .
Also the Highlight modifier that nproduces google search like highlighting
pedro
Zoran Knezevic wrote:
<?php /* * Smarty plugin * -------------------------------------------------------------* File: modifier.number_format.php * Type: modifier * Name: number_format* Purpose: Format a number with grouped thousands * ------------------------------------------------------------- */ function smarty_modifier_number_format($string, $a = 2, $b = \'.\',$c = \',\') {return number_format($string,$a,$b,$c);} ?> I use this modifier to format numbers that I get from database or calculations in the php. This is pure presentation thing that is why I think this should be part of standard smarty modifiers. Best regards, Zoran Knezevic