Re: Tired and feeling dumb...maths question....

From: Date: Thu, 14 Jul 2005 19:07:17 +0000
Subject: Re: Tired and feeling dumb...maths question....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-218712@lists.php.net to get a copy of this message
basically...how do I get the average? $pic_no_of_votes --- > holds the total number of votes (eg: 212) $vote_total_pts ----> holds the total points from all those votes (eg: 1027) how do i get the average down to something like: 3.23 or 1.02 or 4.11 etc
average = 1027 (total pts) / 212 (number of votes) = 4.84 (rounded)

« previous php.general (#218712) next »