Re: newbie - decimal places in arthimetic functions
| From: | Joseph W. Goff | Date: | Fri, 13 Dec 2002 19:31:27 +0000 |
| Subject: | Re: newbie - decimal places in arthimetic functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128199@lists.php.net to get a copy of this message | ||
You can use the format() function for this.
http://www.php.net/format
----- Original Message -----
From: "Max Clark" <max@clarksys.com>
To: <php-general@lists.php.net>
Sent: Friday, December 13, 2002 1:10 PM
Subject: [PHP] newbie - decimal places in arthimetic functions
> Hi-
>
> How can I control the decimal places returned by an arthimetic function?
>
> I would like this divsion function to only return two decimal places
> (rounded up).
>
> $calcsize = $value / $oneGig;
>
> Thanks in advance,
> Max
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>