DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 18, 2018, 08:59:47 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Comma-Delineated Numbers  (Read 341 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Codemeister
****
Offline Offline

Posts: 441


View Profile
« on: February 22, 2018, 12:37:38 PM »

Is there a way...to cause large numbers, like you total gold, for example, to show up comma-delineated, so that 1000000 shows up as 1,000,000 instead?
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1884


You're welcome.


View Profile WWW
« Reply #1 on: February 22, 2018, 02:54:52 PM »

Google number_format().
Logged

TGTarheel
Codemeister
****
Offline Offline

Posts: 441


View Profile
« Reply #2 on: February 22, 2018, 09:26:56 PM »

Google number_format().

Thanks, will do that.

It worked.

But I got a call stack, and realized, on my own, that I needed to make sure it did not do the number format on zero.

A simple if statement took care of that.

Thanks again!
« Last Edit: February 22, 2018, 09:49:06 PM by TGTarheel » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
41 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search