RE: [PHP-DB] Numeric question
| From: | Gryffyn, Trevor | Date: | Tue, 16 Nov 2004 21:25:38 +0000 |
| Subject: | RE: [PHP-DB] Numeric question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37303@lists.php.net to get a copy of this message | ||
$number = 0.590666666667;
Round($number,2);
YAY!
:)
-TG
> -----Original Message-----
> From: Chris Payne [mailto:cjp@planetoxygene.com]
> Sent: Tuesday, November 16, 2004 3:38 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Numeric question
>
>
> Hi there everyone,
>
>
>
> Just a quick question, I'm having to calculate some values
> from an existing
> database, but on some of the results I get (For example)
>
>
>
> 0.590666666667
>
>
>
> How can I limit the result to only 2 digits after the decimal
> point with
> PHP?
>
>
>
> Thanks
>
>
>
> Chris
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.797 / Virus Database: 541 - Release Date: 11/15/2004
>
>