I want to enable a simple voting system. I think it might work, but I would like some of you guys that are better at math to help me out. The user would get to vote on a scale of 1-10, meaning based on what they thought, they would click 1-10. MySQL would keep track of the total of votes (each users click would just be added to the sum in $rating, so if one user clicked 5, another clicked 4, and another clicked 7, $rating would equal 16) and the total number of votes counted ($num_votes), in the above example it would equal 3. So in order to find out the scale of 10 rating, the code would just divide $rating by $num_votes. In the above example, the final rating would be 5.3333 (how do I round in php?). My question is: will this always work, will i always recieve an answer <= 10? Thanks for any help.