DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 24, 2018, 08:30:42 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 226 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Codemeister
****
Offline Offline

Posts: 427


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: 1870


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: 427


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
Please take the time to read the FAQ and browse the DragonPedia

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