Currency Modifier
| From: | Martin Kloss | Date: | Thu, 06 Mar 2003 14:14:49 +0000 |
| Subject: | Currency Modifier | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8444@lists.php.net to get a copy of this message | ||
I just added my modifier to the plugins directory.
In case anyone wants to know :-)
function smarty_modifier_currency ($var, $decimals=2)
{
return empty($var) ? "0,-" : number_format (doubleval($var)/100, $decimals, ",", ".");} Martin. Martin Kloss Need music? http://www.selling-sound.com Like the author? Buy the book at: http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd Get your daily dose of Lingo at the LingoPark: http://www.lingopark.com