Re: Preserving Decimals
| From: | Yoed Anis | Date: | Sat, 17 Jun 2000 02:29:37 +0000 |
| Subject: | Re: Preserving Decimals | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2117@lists.php.net to get a copy of this message | ||
nah, that part is just human error... I type to fast! ;-)
----- Original Message -----
From: <webmaster@accessinter.net>
To: Yoed Anis <yoed@zarcrom.com>
Cc: <php-general@lists.php.net>
Sent: Friday, June 16, 2000 11:12
Subject: Re: [PHP-GENERAL] Preserving Decimals
> I think something is really wrong
> >Or if I were to add 4.50 to 3.00 it would display 8.5 not 8.50
>
> 4.50 + 3.00 = 7.50 not 8.5 or 8.50
>
>
>
> >
> >From: "Yoed Anis" <yoed@zarcrom.com>
> >Date: Fri, 16 Jun 2000 15:59:45 -0500
> >To: <php-general@lists.php.net>
> >Subject: [PHP-GENERAL] Preserving Decimals
> >
> >Hello,
> >
> >PHP seems to do a funny thing when it adds empty decimals.. it makes them
> >disappear.
> >So if I were to add 5.00 to 4.00 it would display 9, not 9.00
> >Or if I were to add 4.50 to 3.00 it would display 8.5 not 8.50
> >I have looked through the archives and my book for a solution to this
> >problem, since I thought it should be quiet common. After all PHP is used
in
> >many commerce sites.
> >
> >So what is the simplest way to preserve decimals in a variable?
> >
> >Best Regards,
> >Yoed
> >
> >P.S.
> >please reply directly to me as well as the list.
> >
> >
> >--
> >PHP General Mailing List (<a href="<a
href="http://www.php.net/)">http://www.php.net/)</a>">http://www.php.net/)">
http://www.php.net/)</a></a>
> >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
> >
> >
>