Printing the maximum average score and names of students having this maximum average score as per the order in the file .
for ( $ i = 0 ; $ i < count ( $ names ) ; $ i ++ ) { echo $ names [ $ i ] . " " ; } echo $ maxAvgScore ; }