Welcome aboard! We are happy you are here and wish you good net-raft!
<?php
function usersWithSuffix($input)
{
$suffixes = array('', 'K', 'M', 'B', 'T');
$suffixIndex = 0;
while(abs($input) >= 1000 && $suffixIndex < sizeof($suffixes)) {
$suffixIndex++;
$input /= 1000;
}
return ($input > 0 ? floor($input * 1000) / 1000 : ceil($input * 1000) / 1000). $suffixes[$suffixIndex];
}
echo usersWithSuffix('10000');
?>
The most helpful PHP solutions
detect browser phpPHP Click to see more ... 4.6K 408