title: while ($row = mysql_fetch_array($result)) - how many loops are being performed?
body: <p>if...</p>
  
  <pre><code>$query = "SELECT col1,col2,col3 FROM table WHERE id &gt; 100"
  $result = mysql_query($query);
  </code></pre>
  
  <p>for this action:</p>
  
  <pre><code>while ($row = mysql_fetch_array($result)){
     ....
  }
  </code></pre>
  
  <p><strong>is this doing 1 loop (iterated x times)?</strong></p>
  
  <p>and for this one:</p>
  
  <pre><code>$row = mysql_fetch_array($result)
  foreach($row as $r){
     ...
  }
  </code></pre>
  
  <p><strong>is this doing 2 loops (iterated x times)?</strong></p>
  
  <p>where x is the number of results</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>ok thanks guys, ok I basically phrased this question really, really badly.</p>
  
  <p>in retrospect it should have been  </p>
  
  <blockquote>
    <p>'does mysql_fetch_array() only return one
    row each time it is called'</p>
  </blockquote>
  
  <p>I an now happy that my understanding of mysql_fetch_array() was v. incorrect!</p>
  
  <p>thanks for your time!</p>