Student grade solver with remarks PHP