On my game, I have it to where when someone logs in, it displays their cash. It's Fetched from the database.
<div id="StatText">Cash: <span id="Cash">$<?php echo number_format($cash) ?></span></div>
Well, I updated the database for my account and gave myself $10,000,000,000,000 = 10 Trillion dollars. Well How would I make it to where a user's cash would show like this. If they had $16,500 It would display $16.5K And same with millions billions ETC.
Example:
$16,500 = 16.5K
$160,500 = 160.5K
$1,600,500 = 1.6M
$10,000,016,500 = 10B
$9,110,000,016,500 = 9.1T
Nothing really showed up on Google.
Thanks For Any Help!