[Edit] Format a number Kformat
exampleecho Kformat(1000);//1k echo Kformat(10000);//10k function Kformat($number) { $prefixes = 'kMGTPEZY'; if ($number >= 1000) { $log1000 = floor(log10($number)/3); return floor($number/(1000*$log1000)).$prefixes[$log1000-1]; } return $number; } |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved