DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 19, 2018, 07:17:39 PM
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 366 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Codemeister
****
Online Online

Posts: 454


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


You're welcome.


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

Google number_format().
Logged

TGTarheel
Codemeister
****
Online Online

Posts: 454


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
Version 1.1.2 is the current supported version and is available for download.

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