RE: [PHP] Plain Number
| From: | Jay Blanchard | Date: | Tue, 20 Jul 2004 00:04:37 +0000 |
| Subject: | RE: [PHP] Plain Number | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-191091@lists.php.net to get a copy of this message | ||
[snip]
Is there an easy way to make a number have no comma or decmal points?
I've tried string replace with the comma but thought there would be a
better alternative that I'm missing to cover more bases. number_format
seems to add instead of take away items.
[/snip]
number_format($theNumber, 0, '', ''); (I think I have all of the attributes
here, check http://www.php.net/number_format to make
sure) has no decimal places, no seperator, and no comma.