Didn't I comment on this? No new line here only when the variables is used as an argument of foreach(). Also, newline before $error should be removed.