note 32230 deleted from function.round by alindeman
| From: | alindeman@php.net | Date: | Wed, 21 May 2003 01:21:01 +0000 |
| Subject: | note 32230 deleted from function.round by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48707@lists.php.net to get a copy of this message | ||
Note Submitter: Justin
----
I need a way to display a nice looking number. Everything I try messes it up in some different way.
Say I have:
$num = 123456789123456789;
format_number($num);
//123,456,789,123,456,800 is the output
and
$num = 123456789123456789;
ceil(number_format($num));
//123 is the output
I need a way that it will read
123,456,789,123,456,789
but if it is a decimal I need it to be shown like:
123,456.789123456789
without extra zeros or anything.
This has to work for just about any number except for scientific notation. And the data is inserted
without comma's.
Replies would be GREATLY appreciated!