$totalVotes += $votes[$i] is the same as
$totalVotes = $totalVotes + $votes[$i]
but the first time this is run, there isnt a variable "$totalVotes" to add $votes[$i] to: so set it to zero before your for loop, and you should be okay.
$totalVotes = 0;
for ($i = 1; $i < count($votes); $i = $i + 2)
{
// add together each vote total to find the total number of votes cast
$totalVotes += $votes[$i];
}
Hope that helps!