This is a small PHP function that will help to format numbers in short way as Thousand, Milions, Billions, Trillions to K, M, B, T.
echo num_format(1900);
Output: 1.9K
Feel free to use this function if you need, There is no restriction xD.
This is a PHP function to format numbers to nearest thousands such as Kilos, Millions, Billions, and Trillions with K, M, B, T
PHP