Quiz setting users grade
You could use an array of grades:

$grades = Array("F","F","F","F","F","F","D","C","B","A","A+");
if($_SESSION['numberQuestions'] == 10){
    if ($_SESSION['score'] &lt;= 10 and $_SESSION['score'] &gt;= 0) {
        $grade = $grades[$_SESSION['score']];
    } else {
        $grade = 'Unknown';
    }
}


Use the same method for the second test.