MyBB Support

Statistics of forum

Submitted by Fstyle, , Thread ID: 13758

Thread Closed
04-12-2015, 01:03 PM
#1
I want to ask how to get it:
"Statistics
Posts:
3.8k
Threads:
344
"

Look forward to the answer.
Thank you

RE: Statistics of forum

#2
I have a common one but it shows bars & stars would that be okey?

RE: Statistics of forum

OP
#3
sorry, I want to ask how the letter "k" after 3.8k

RE: Statistics of forum

#4
04-12-2015, 03:13 PM
Fstyle Wrote:
sorry, I want to ask how the letter "k" after 3.8k

It's simple PHP.
[Image: InZ3hGx.png]

RE: Statistics of forum

#5
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>";
}

?>
1

Users browsing this thread: 2 Guest(s)