Pages: [1]
Author Topic: Making the numbers on stats or etc have the comma for every thousand  (Read 1265 times)
Fernando Gomez
Guest


Email
on: Apr 02, 08, 03:04 AM

How can I make the numbers on stats and everywhere else in the script have the comman after every thousand?

Example, Current 1000
I want to have 1,000

I think it's just a matter of a PHP edit but where and to what?

I know the months you just put m d y or M d Y Etc. no clue for the numbers and where and what to change it to.
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #1 on: Apr 04, 08, 12:04 AM

there is a PHP function number_format which does the trick. So, to make stats (the "Stats" block) looks like this: "total plays: 123,123,123" you should edit the code of the STATS block:
current code (one of the lines, changes in other lines are the same):
Code:
"STAT-PLAYSTOTAL" => $res["total"],
new code:
Code:
"STAT-PLAYSTOTAL" => number_format($res["total"]),
Logged
Pages: [1]
 
Jump to: