Most efficient way to produce dynamic table in PHP
<p>I'm currently working on a dynamic table below:</p>

<pre><code>echo '&lt;table border=1&gt;';
echo '&lt;tr align="center" width="140"&gt;&lt;td&gt;column 1 &amp;rarr;
&lt;br /&gt;&amp;darr; column 2&lt;/td&gt;';
echo "&lt;td width='70'&gt;{$c1}&lt;/td&gt;";
echo "&lt;td width='70'&gt;{$c2}&lt;/td&gt;";
echo "&lt;td width='70'&gt;{$c3}&lt;/td&gt;";
echo "&lt;td width='70'&gt;{$c4}&lt;/td&gt;";
echo "&lt;td width='70'&gt;{$c5}&lt;/td&gt;";
echo '&lt;/tr&gt;';
for ($i = $min; $i &lt;= $max; $i+=5) {
    echo '&lt;tr align="center"&gt;';
    echo '&lt;td&gt;'.$i.'&lt;/td&gt;
    &lt;td&gt;'.$c1*$i.'&lt;/td&gt;
    &lt;td&gt;'.$c2*$i.'&lt;/td&gt;
    &lt;td&gt;'.$c3*$i.'&lt;/td&gt;
    &lt;td&gt;'.$c4*$i.'&lt;/td&gt;
    &lt;td&gt;'.$c5*$i.'&lt;/td&gt;';
    echo '&lt;/tr&gt;';
}
echo '&lt;/table&gt;';
</code></pre>

<p>I was just wondering if there was a more effective less time-consuming method of generating it?</p>

<p>The table is created from the following inputs</p>

<pre><code>min, max, c1, c2, c3, c4, c5
</code></pre>

<p>where if for example:</p>

<pre><code>min=30, max=45, c1=5, c2=10, c3=15, c4=20, c5=25
</code></pre>

<p>the table might look something like:</p>

<p><img src="http://i.stack.imgur.com/4Mb9E.png" alt="enter image description here"></p>

<p>Thanks in advance!</p>
