How to make a foreach of all objects in a class. In this example $row contains the objects.
foreach (get_object_vars($row) as $element) { $element; }