getTable('User')->findAll(); foreach($users as $user) { print $user->name."
"; foreach($user->Phonenumber as $phonenumber) { print $phonenumber."
"; } } // same thing implemented much more efficiently: // (using only one sql query for object population) $users = $conn->query("FROM User.Phonenumber"); foreach($users as $user) { print $user->name."
"; foreach($user->Phonenumber as $phonenumber) { print $phonenumber."
"; } } ?>