RE: [PHP] Floating values
| From: | Graham Cossey | Date: | Mon, 18 Oct 2004 11:12:39 +0000 |
| Subject: | RE: [PHP] Floating values | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199714@lists.php.net to get a copy of this message | ||
How about this?
http://uk2.php.net/manual/en/function.number-format.php
HTH
Graham
> -----Original Message-----
> From: Nunners [mailto:webmaster@jnsolutions.co.uk]
> Sent: 18 October 2004 12:03
> To: php-general@lists.php.net
> Subject: [PHP] Floating values
>
>
> Simple question.
>
>
>
> I'm writing an accounting package, and have setup the MySQL database with
> decimal(6,2) types for the amount of transactions etc.
>
>
>
> Is there a way I can reproduce this in the php output?
>
>
>
> i.e. the number sorted is 8.70 and when you output the value it
> comes out as
> 8.7
>
>
>
> The question is how do I add the .00?
>
>
>
> Cheers
>
> Nunners
>
>