Re: What to use?

From: Date: Thu, 25 Sep 2003 20:51:17 +0000
Subject: Re: What to use?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164000@lists.php.net to get a copy of this message
On Thu, Sep 25, 2003 at 10:01:48PM +0200, Ryan A wrote: : : I am running a query on the database to get the avg of a few fields, I am : getting a result something like this: : : 5.0000 : 4.0000 : 5.0000 : : I dont want to use such big averages and want to cut the last to digits off : so it will be something like: : 5.00 : 4.00 : 44.23 : etc Why not keep the precision internally and only deal with it as an output formatting issue when you display the results? $a = 5.0000; printf("\$a = %.2f \n", $a);

« previous php.general (#164000) next »