$grades = explode(“,”, #גמרא#); $totalGrade = 0;
foreach($grades as $grade) { $totalGrade += intval($grade); }
return $totalGrade;