Re: int conversions
| From: | Chris Lee | Date: | Sun, 12 Nov 2000 05:12:27 +0000 |
| Subject: | Re: int conversions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24871@lists.php.net to get a copy of this message | ||
use number_format()
$float = 70.707070707070;
$float = number_format($float, 2);
For more information check out.
http://www.php.net/manual/function.number-format.php
Chris Lee
Mediawaveonline.com
In article <Pine.LNX.4.21.0011122012550.1236-100000@patrijs.dhs.org>,
hennink@patrijs.max.nl wrote:
> Hi,
>
> how can I simple convert the following float to an float with only 2
> decimals. e.g. 70,707070707070 -> 70,71
>
> With regards,
>
> Tijmen
>