Re: newbie - decimal places in arthimetic functions
| From: | Joseph W. Goff | Date: | Fri, 13 Dec 2002 19:34:36 +0000 |
| Subject: | Re: newbie - decimal places in arthimetic functions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128202@lists.php.net to get a copy of this message | ||
I'm sorry, posted the wrong link.
It is the number_format() function.
http://www.php.net/number_format
----- Original Message -----
From: "Joseph W. Goff" <jgoff@users.sourceforge.net>
To: "php-general" <php-general@lists.php.net>; "Max Clark"
<max@clarksys.com>
Sent: Friday, December 13, 2002 1:31 PM
Subject: Re: [PHP] newbie - decimal places in arthimetic functions
> 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
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>