Re: Preserving Decimals

From: Date: Fri, 16 Jun 2000 21:12:39 +0000
Subject: Re: Preserving Decimals
Groups: php.general 
Request: Send a blank email to php-general+get-2108@lists.php.net to get a copy of this message
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 > >

« previous php.general (#2108) next »