Statistics of forum

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

Look forward to the answer.
Thank you
ɪᴍ ᴀʟᴡᴀʏs ᴛɪʀᴇᴅ
Posts:
2,942
Joined:
Nov 2015
Likes:
411
Credits:
1,300
Reputation:
192
2 Years of Service
#2
Posted: 04-12-2015, 12:42 PM
I have a common one but it shows bars & stars would that be okey?
Novice
Posts:
47
Joined:
Feb 2015
Likes:
5
Credits:
52
Reputation:
0
3 Years of Service
#3
OP
Posted: 04-12-2015, 02:13 PM
sorry, I want to ask how the letter "k" after 3.8k

Posts:
11,184
Joined:
Apr 2015
Likes:
945
Credits:
18,564
Reputation:
189
3 Years of Service
#4
Posted: 04-12-2015, 02:32 PM
(04-12-2015, 02: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
2 Years of Service
#5
Posted: 15-12-2015, 05: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, 08: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)