Let's say that you have a counter script on a popular site that you coded yourself. What if you get well over 1,000 hits? Without proper formatting the number would be displayed as 1000 without any commas.
Using number_format you can change this.
Here is a basic number format:
<? $number = 1000; echo number_format($number); ?>
Comments
Post new comment