I am trying assign grades for input integers. But I found it difficult to complete the code. Is there any other way to do the below code such that it will give me desired result?

=========================

```
$grade = {if($ave>=90 && $ave<100) {
    echo "A";
}
else if ($ave>=60 && $ave<90) {
    echo "B";
}
else {
    echo "F9";
}
return 0;
}

```

================================

```
<td><?php echo $fetch['name']?></td>
<td><?php echo $fetch['eng']?></td>
<td><?php echo $fetch['mat']?></td>
<td><?php echo $fetch['lit']?></td>
<td><?php echo $grade ?></td>

```

The grade will be assigned based on the Average i.e ($ave). I have done the average but the grade is the issue.