For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > June 2004 > Re: [SMARTY] number_format









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] number_format
Martín troielli

2004-06-25, 6:49 pm

> I was searching around in the manual for php's number_format capability,
> but couldnt find anything - does it exist in smarty?


i did't find it so i used the |@ modifier invoking the number_format
function

Martin Troielli
Monte Ohrt

2004-06-25, 6:49 pm

FYI, "@" only changes the behavior of a modifier with an array, it has
nothing to do with executing PHP functions directly.

from docs:

"If you apply a modifier to an array variable instead of a single value
variable, the modifier will be applied to every value in that array. If
you really want the modifier to work on an entire array as a value, you
must prepend the modifier name with an @ symbol like so:
{$articleTitle|@count} (this will print out the number of elements in
the $articleTitle array.)"

MartXn_Troielli wrote:

>
>i did't find it so i used the |@ modifier invoking the number_format
>function
>
>Martin Troielli
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com