PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
tkarven
Forum Commoner
Posts: 41 Joined: Tue Aug 02, 2005 10:26 pm
Post
by tkarven » Sun Aug 07, 2005 11:21 pm
hi,
how can we display the comma for currency(integer) ?
e.g. 1,000,000 instead of 1000000
thx
harrisonad
Forum Contributor
Posts: 288 Joined: Fri Oct 15, 2004 4:58 am
Location: Philippines
Contact:
Post
by harrisonad » Sun Aug 07, 2005 11:26 pm
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Aug 07, 2005 11:50 pm
default behaviour for number_format is a comma seperator for thousands and dot for the decimal.
tkarven
Forum Commoner
Posts: 41 Joined: Tue Aug 02, 2005 10:26 pm
Post
by tkarven » Sun Aug 07, 2005 11:53 pm
thanks so much , i got it