I have a stats script that is always collecting data and returns large numbers every time. The numbers it returns appear as just numbers with no commas. So instead of the default '100000' (for example), is there a small snippet I could add that will automatically put a comma, starting from right to left, for every 3 digits? Example:
1000 - 1,000
10000 - 10,000
100000 - 100,000
1000000 - 1,000,000
etc.