I am making a rating system where people can rate something on my website, but how do i do it so that it shows a total average rating between 1 and 10 after they have rated it, instead of them all added up? Cheers
Add up all the ratings and divide it by how many total votes there have been floor() the result just to make sure you dont get any decimal values.
If you use a database to store the votes you can do something like this: SELECT AVG(vote) AS avg FROM votes