finding average score of a student
$ avgScore = ( int ) ( ( intval ( $ file [ $ i + 1 ] ) + intval ( $ file [ $ i + 2 ] ) + intval ( $ file [ $ i + 3 ] ) ) / 3 ) ; if ( $ avgScore > $ maxAvgScore ) { $ maxAvgScore = $ avgScore ;