Bonesnap;10989287 wrote:It returns FALSE if there are no more rows.
How do you know this? Your psychic powers are much more in tune than mine, because I can't even tell what type of object $result is, let alone what value one of its methods returns.
For example, if we're talking about [man]MySQLi[/man], MySQLi_Result::fetch_assoc() (man page: [man]mysqli-result.fetch-assoc[/man]) does indeed return NULL when no more rows exist in the result set.
Regardless, neither NULL nor FALSE are equivalent to boolean TRUE, so either value in a loop's conditional expression would terminate said loop.