PHP POST array to table
<p>I new to PHP. I'm trying to make an Incidence of Coincidence (IC) calculator from bits and pieces of code that i've patched together from other peoples work.  It's all working fine except for the part where it is posted to table.  I want it to stop making new cells after 50.
I've been looking at it for hours and have tried several other methods but i've confused myself.  Any help please?</p>

<p>Here's the code that's writes the table:</p>

<pre><code>&lt;?php
  if ( $showTable ) {
    // display tabulated values
    echo "&lt;table class=\"trans\" width=\"1000\" border=\"1\" cellpadding=\"0\"&gt;"; 
    for ( $i = 1; $i &lt; 50; $i++ ) {
         echo "&lt;tr&gt;"; 
         for ($c=0; $c &lt;$cols; $c++) 
         {
         echo "&lt;td&gt;"; 
         echo($cells.': '.round($history[$i+$c], 3));
         $cells++;
         echo "&lt;/td&gt;"; 
         }
    }
    echo "&lt;/tr&gt;";
     $i += $c; 
  }
     echo "&lt;/table&gt;";  
?&gt;
</code></pre>
