There’s no while in what I posted. Generally, if you get an “Unexpected {anything}” error then the problem is a missing ; on a previous line of php, could also be other things as well. But the real error is on the lines before the line reported by PHP.