Correct syntax error in example

foreach ($image = $imlist->next()) is not valid php syntax.