title: looping MySQL query result in PHP
body: <pre><code>$b = 1;
  $d = mysql_query("select *from 'table_name'");
  while($b &lt; 10){
      while($e = mysql_fetch_array($d)){
          echo $e['name_field'];
      }
      $b++;
  }
  </code></pre>
  
  <p>I want to loop the output, but I'm stuck. I've tried but still got nothing.
  something like this : </p>
  
  <pre><code>&lt;?php
  $a = 0; 
  $b = 0;
  for($a=0;$a&lt;10;$a++){
      for($b=0;$b&lt;10;$b++){
          echo $b;        
      }
  }
  </code></pre>