You are here: Re: [PHP] Tired and feeling dumb...maths question.... « PHP « IT news, forums, messages
Re: [PHP] Tired and feeling dumb...maths question....

Posted by "Lawrence Kennon" on 10/21/37 11:21

> 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)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация