Calling a function within the parameter of while loop in PHP
I've been stuck on this concept for about 5 hours now, and it's really
frustrating me.
$result = $mysqli->query("SELECT col FROM table");
while($row = $result->fetch_assoc()){
echo $row['data'];
}
I understand that the function only fetches one row at a time, but I don't
understand how it's being called when the loop resets. How is it being
called in $row = $result->fetch_assoc? Also, how does this condition
evaluate to true if $row is null?
No comments:
Post a Comment