Statistics of forum

by Fstyle - 04-12-2015, 01:03 PM
Novice
Posts:
47
Joined:
Feb 2015
Likes:
5
Credits:
124
Reputation:
0
2 Years of Service
#1
OP
Posted: 04-12-2015, 01:03 PM
I want to ask how to get it:
"Statistics
Posts:
3.8k
Threads:
344
"

Look forward to the answer.
Thank you
servical
Anime
Posts:
2,471
Joined:
Nov 2015
Likes:
304
Credits:
72
Reputation:
139
1 Year of Service
#2
Posted: 04-12-2015, 01:42 PM
I have a common one but it shows bars & stars would that be okey?
[Image: rrvnhz.png]

Novice
Posts:
47
Joined:
Feb 2015
Likes:
5
Credits:
124
Reputation:
0
2 Years of Service
#3
OP
Posted: 04-12-2015, 03:13 PM
sorry, I want to ask how the letter "k" after 3.8k
­
Paradigm
Posts:
9,551
Joined:
Apr 2015
Likes:
716
Credits:
18,609
Reputation:
127
2 Years of Service
#4
Posted: 04-12-2015, 03:32 PM
(04-12-2015, 03:13 PM)Fstyle Wrote: sorry, I want to ask how the letter "k" after 3.8k

It's simple PHP.
もうあなたから愛されることも
必要とされることもない
そして私はこうして一人ぼっちで
Closed Account
Posts:
24
Joined:
Dec 2015
Likes:
3
Credits:
52
Reputation:
5
1 Year of Service
#5
Posted: 15-12-2015, 06:53 PM
PHP Code:
$numbers = array(1000,2000);


function 
format_number($number) {
    if(
$number >= 1000) {
       return 
$number/1000 "k";  
    }
    else {
        return 
$number;
    }
}


foreach(
$numbers as $number) {
    echo 
format_number($number);
    echo 
"<br>";
}

?>
Faded
15-12-2015, 09:24 PM
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)