Re: Plain Number
| From: | Matthew Sims | Date: | Tue, 20 Jul 2004 02:23:34 +0000 |
| Subject: | Re: Plain Number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191103@lists.php.net to get a copy of this message | ||
> 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.
> Jeff
>
If by no comma or decimal point you mean rounding to a whole integer,
check out the round() function.
http://us3.php.net/manual/en/function.round.php
--Matthew Sims
--<http://killermookie.org>