I'm working on poll results and I want to fit 4 dynamic numbers in 100%. Sorry if I didn't explain it correctly, I'm native Dutch and I'm having a hard time trying to explain it correctly.
This is what I mean: If my poll results are like this;
- Answer 1: 1 vote
- Answer 2: 1 vote
- Answer 3: 1 vote
- Answer 4: 1 vote
The result should be 25, 25, 25, 25.
Is there a way to calculate this? I have all answer counts in a array like this:
$all_values = array($answers_1, $answer_2, $answer_3, $answer_4);
How can I accomplish this in PHP?