title: Building html tables from query data... faster?
body: <p>With my limited experience/knowledge I am using the following structure to generate HTML tables on the fly from MySQL queries:</p>
  
  <pre><code>$c = 0;
  $t = count($results);
  
  $table = '&lt;table&gt;';
  
  while ($c &lt; $t) {
     $table .= "&lt;tr&gt;&lt;td&gt;$results[0]&lt;/td&gt;&lt;td&gt;$results[1]&lt;/td&gt; (etc etc) &lt;/tr&gt;";
     ++$c;
  }
  
  $table .= '&lt;/table&gt;';
  </code></pre>
  
  <p>this works, obviously. But for tables with 300+ rows there is a noticeable delay in pageload while the script builds the table. Currently the maximum results list is only about 1,100 rows, and the wait isn't long, but there's clearly a wait.</p>
  
  <p>Are there other methods for outputting an HTML table that are faster than my WHILE loop? (PHP only please...)</p>