Page 1 of 1

display comma in integer

Posted: Sun Aug 07, 2005 11:21 pm
by tkarven
hi,

how can we display the comma for currency(integer) ?

e.g. 1,000,000 instead of 1000000

thx

Posted: Sun Aug 07, 2005 11:26 pm
by harrisonad
string number_format ( float number [, int decimals [, string dec_point, string thousands_sep]] )
The fourth arguements take any character to be displayed for thousands group

Posted: Sun Aug 07, 2005 11:50 pm
by feyd
default behaviour for number_format is a comma seperator for thousands and dot for the decimal.

Posted: Sun Aug 07, 2005 11:53 pm
by tkarven
thanks so much , i got it