note 30408 deleted from function.wordwrap by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 02:51:59 +0000 |
| Subject: | note 30408 deleted from function.wordwrap by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48353@lists.php.net to get a copy of this message | ||
Note Submitter: c97@c97.art.pl
----
This small function will break string of numbers with comma. It is extremely usable when you want
for example show file size.
Example:
Before - 4238976 bytes
After - 4,238,976 bytes
function nice_number($number) {
return strrev(wordwrap(strrev($number), 3, ',', 1));
}