Where does the index in the while loop change in this PHP snippet?
<p>PHP lists this example as a way to retrieve database data.</p>

<pre><code>&lt;?php
$return = []
$qry = "SELECT * FROM exp_member_data";
$res = mysql_query($mem_qry);

function mysql_fetch_all($res) {
   while($row=mysql_fetch_array($res)) {
       $return[] = $row;
   }
   return $return;
}
?&gt;
</code></pre>

<p>I am confused about how this while loop progresses. What guarantees that <code>$row=mysql_fetch_array($res)</code> is different for every iteration of the while loop?</p>
