$rollno[$key]

What the error is saying as that $rollno has nothing at position 15.

$rollno[15] <=== is undefined, it isn't set.


foreach($att as $key => $attendance)

You're iterating...