Preserving Decimals

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

« previous php.general (#2099) next »