Log 2515
09/01/2024 2024-01-09 15:09$parasha = #פרשה#;
$total = 0;
$count = 0;
switch ($parasha) {
case “פרשה1”:
$total += 10;
$count++;
break;
case “פרשה2”:
$total += 8;
$count++;
break;
case “פרשה3”:
$total += 12;
$count++;
break;
// Add more cases for each parasha
default:
return “”; // Default empty value if parasha is not found
}
if ($count > 0) {
return round($total / $count, 2); // Calculate and return the average with two decimal places
} else {
return “”; // Empty value if no parashot were found
}