0
Hello, I have a voting system for a news that contains like and deslike.
However, I would like to calculate a percentage of this news, based on the amount of votes, positive or negative. For example: when I don’t have any votes it would be 100%, or with 10 positives it would be 100%. How can I do this in php?
Your question is about the account? It’s not clear.
– bfavaretto
I record the votes, like and deslikes. I want to make a calculation to know the percentage of news based on those votes. That is, to give a note the news...
– Paulo Sérgio Filho
dislike + like = Total. (Dislike / Total) * 100 = % dislike. (Like / Total) * 100 = % like. If you can post some code snippets it is better to exemplify.
– Bruno Folle