just take the total amount of votes and divide it by the number that each option gets.
so lets assume you have 24 total votes and 4 options.
option 1 = 5
option 2 = 4
option 3 = 7
option 4 = 8
so
option 1 has 20.8% of the votes
option 2 has 16.6% of the votes
option 3 has 29.1% of the votes
option 4 has 33.3% of the votes
the formula is
option1 divided by total_votes 100 = percentage.
$percentage = $option1/$total_votes100;
hope that helps.
Note: you will probably have to round off the numbers. I'm not extremely sure how to do that in PHP, since I'm just learning.
sijis