function getConstraintForLevel($level) { if ($level == "Lycées" || $level == "Lycée" || $level == "Lycee") { return getConstraintLycees(); } else { if ($level == "Collèges" || $level == "Collège" || $level == "College") { return getConstraintColleges(); } else { return getConstraintCollegesLycees(); } } }
function getConstraintCollegesLycees() { return "(" . getConstraintLycees() . " OR " . getConstraintColleges() . ")"; }