Seeking assistant is converting numbers to currency

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

Post Reply
VVal
Forum Newbie
Posts: 3
Joined: Thu Jul 09, 2009 3:38 pm

Seeking assistant is converting numbers to currency

Post by VVal »

Good afternoon, I would appreciate any help I can get on the subjected topic;

I have a variable called $money_available, this return a number, however I want it to display in dollar format for instance. I want 1000000 to be displayed as $1,000,000. Can anyone assist me in getting this output?

<td>'.$field['money_available'].'</td

How would I use the php function that do this conversion in the line above?

Thank you
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Seeking assistant is converting numbers to currency

Post by requinix »

So I guess you haven't heard about the number_format function?
Post Reply