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?
whileloop does not reset. Also what do you mean by "how does this condition evaluate to true if$rowis null?"? Because if$rowisNULLit does not evaluate totrue, so you should perhaps define what the condition is you ask about.