Re: Changing numbers
| From: | Curt Zirzow | Date: | Mon, 21 Jul 2003 20:57:36 +0000 |
| Subject: | Re: Changing numbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156140@lists.php.net to get a copy of this message | ||
* Thus wrote zavaboy (zavaboy@hotmail.com):
> I have the following numbers:
>
> 12.400
> 666.75
> 23
> 369.2
> 3.234
>
> How can I make them have at least 2 decimal places?
> So, they will output:
>
> 12.40
> 666.75
> 23.00
> 269.20
> 3.234
>
> Thanks in advance!
http://php.net/number_format
or
http://php.net/printf
Curt
--
"I used to think I was indecisive, but now I'm not so sure."