nheimberg Posted May 3, 2007 Share Posted May 3, 2007 What is the way to get money amounts to show properly? ie. $123,456,789 rather than $123456789 I would like the commas to be used. Thanks, Natasha Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 3, 2007 Share Posted May 3, 2007 Re: Number format echo '$' . number_format(1852197591875198751975); Quote Link to comment Share on other sites More sharing options...
nheimberg Posted May 3, 2007 Author Share Posted May 3, 2007 Re: Number format Got it. THanks Deception Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 4, 2007 Share Posted May 4, 2007 Re: Number format i also want to do this on my game where would i add that? Quote Link to comment Share on other sites More sharing options...
nheimberg Posted May 4, 2007 Author Share Posted May 4, 2007 Re: Number format I have a link in my header that shows amount of money in bank and it links to the bank. It looks like this.... <a href='bank.php'>Go Station Bank: \$".number_format($ir['bankmoney'])." Hope that helps. ~Natasha Quote Link to comment Share on other sites More sharing options...
Akust0m Posted May 5, 2007 Share Posted May 5, 2007 Re: Number format i tried that nheimberg and it came up as a blank white page Quote Link to comment Share on other sites More sharing options...
Silver Posted May 6, 2007 Share Posted May 6, 2007 Re: Number format hmmm, perhaps because the </a> is missing off the end to close the link? Quote Link to comment Share on other sites More sharing options...
Ghetto Posted May 8, 2007 Share Posted May 8, 2007 Re: Number format Unless your running V2 then its, \$$t".money_formatter($ir['money'],'')." Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 8, 2007 Share Posted May 8, 2007 Re: Number format that money_formatter function is useless, number_format does the same, you'll just have to add a $ before it Quote Link to comment Share on other sites More sharing options...
UCC Posted May 8, 2007 Share Posted May 8, 2007 Re: Number format that money_formatter function is useless, number_format does the same, you'll just have to add a $ before it I object. I think the money formatter is great. What if you want to change currency? What if you want to make a copy of your current game, all mods included, in order to start a new one? Maybe your theme changes and you need a new currency. I for one dread having to go through my code removing all my ASCII currency marks as I create my 2nd game. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 8, 2007 Share Posted May 8, 2007 Re: Number format There isn't going to be many places you have a currency symbol, maybe homepage, profiles, shops, a few other places If i was to change currencies i'd just use output buffering and regex the replacements, while i got around to nailing the last few spots it still had it Doesn't matter to me, I just use money() as a function, still has the symbol, my point is that money_formatter wastes a lot of time with how it works Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted May 8, 2007 Share Posted May 8, 2007 Re: Number format yeah print '$'; - the ' disables $ and sql so decepti0ns should work lol i know natasha said it worked, $cash='source'; print "\$".number_format($cash); lol :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.