Re: How to get a double to show the .00 in a hole number
| From: | Andrey Hristov | Date: | Fri, 31 Aug 2001 19:51:46 +0000 |
| Subject: | Re: How to get a double to show the .00 in a hole number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65548@lists.php.net to get a copy of this message | ||
Try number_format()
if you have int than ($int_var*100)/100 or (double)$int_var
number_format((double)$int_var,...)
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Robert J Collins" <robertjcollins@zonehenge.com>
To: <php-general@lists.php.net>
Sent: Friday, August 31, 2001 10:50 PM
Subject: [PHP] How to get a double to show the .00 in a hole number
> I am trying to get a double data type to display the .00 in a "hole" dollar
> amount (i.e. 432.00 not 432 or $432.00 not $432).
>
> Can anyone tell me how to do this?
>
> Thanks,
>
> Robert J Collins
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>