We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
I'm sure the confusing thing is that it's not real apparent HOW this is working.
The while() makes the loop, but the
$row = $r ... etc... is actually setting $row to the values from a retrieved row. Each time through the loop, the next row is taken from the $r resultset and assigned to $row.
Note that the single equal sign, =, is an assignment, not a comparison operator, so an assignment takes place at the same time as the while() loops.
When the resultset is exhausted (you have processed each row), the while() will terminate.
rgb192
ASKER
The while() makes the loop, but the
$row = $r ... etc... is actually setting $row to the values from a retrieved row. Each time through the loop, the next row is taken from the $r resultset and assigned to $row.
because more details
Each time through the loop??
how is the loop advanced?
The fetch method will return the next record and advance the pointer, or NULL if there is no next record.
I do not understand: advance the pointer
It's just looping through each row of the recordset
how?
I am failing to understand a simple concept
I can see a while loop works using a debugger on a php ide
but I do not know why it works
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!