I wrote this function in PHP. It divides each variable $votesX, where X is a politic party name, for 1,2,3... to the value of $seats. Now I've to search the the biggest values of the array and replace them with a zero. How can I do it?
function hondt ($votesA,$votesB,$votesC,$votesD,$votesE,$seats){
for ($i=1; $i<=$seats; $i++){
$votes[0][$i]=$votesA/$i;
}
for ($i=1; $i<=$seats; $i++){
$votes[1][$i]=$votesB/$i;
}
for ($i=1; $i<=$seats; $i++){
$votes[2][$i]=$votesC/$i;
}
for ($i=1; $i<=$seats; $i++){
$votes[3][$i]=$votesD/$i;
}
for ($i=1; $i<=$seats; $i++){
$votes[4][$i]=$votesE/$i;
}
}
I need it urgently.
Thank you in advance.