Well, what do you know, it worked for all the results now. Although, when I add the \n at the end of the line in the loop, it produces a T_CONSTANT_ENCAPSED_STRING error also stating that the target class name cannot be found.
If I do remove the \n, no errors will show up, all the results will...