Multiplying two fields from a for loop
<p>I want to multiply two fields. Below I fetch the needed values from a for loop. In total there are 54 fields in the database, 0 to 53. I need to multiply 9 and 11 and need to save store them in one variable: </p>

<pre><code>&lt;tbody&gt;
&lt;?php
    for($i=0;$i&lt;$count_rd;$i++) {
?&gt;

&lt;tr  class="odd_gradeX"&gt;

&lt;?php
    for($j=0;$j&lt;=53;$j++){  // 0 3 4 7 9 17 18 19 20 21 22
    if(($j != 1) &amp;&amp; ($j != 2) &amp;&amp; ($j != 10) &amp;&amp;  ($j != 5) &amp;&amp; ($j != 6) &amp;&amp; ($j != 8) &amp;&amp; ($j != 11) &amp;&amp; ($j != 12)
    &amp;&amp; ($j != 13) &amp;&amp;  ($j != 14) &amp;&amp; ($j != 15) &amp;&amp; ($j != 16)
    &amp;&amp; ($j != 23) &amp;&amp;  ($j != 24) &amp;&amp; ($j != 25) &amp;&amp; ($j != 26) &amp;&amp; ($j != 27) &amp;&amp; ($j != 28) &amp;&amp; ($j != 29)
    &amp;&amp; ($j != 30) &amp;&amp;  ($j != 36) &amp;&amp; ($j != 37) &amp;&amp; ($j != 38) &amp;&amp; ($j != 39)
    &amp;&amp; ($j != 31) &amp;&amp; ($j != 32)  &amp;&amp; ($j != 33) &amp;&amp; ($j != 34) &amp;&amp; ($j != 35)&amp;&amp; ($j != 40) &amp;&amp; ($j != 41) &amp;&amp; ($j != 42)
    &amp;&amp; ($j != 43) &amp;&amp; ($j != 44) &amp;&amp; ($j != 45) &amp;&amp; ($j != 46) &amp;&amp; ($j != 47) &amp;&amp; ($j != 48) &amp;&amp; ($j != 49)
    &amp;&amp; ($j != 50) &amp;&amp; ($j != 51) &amp;&amp; ($j != 52) &amp;&amp; ($j != 53)){
?&gt;

&lt;?php
    if(($j == 9)||($j == 17)||($j == 18) ||($j == 19) ||($j == 20) ||($j == 21) ||($j == 22)){
?&gt;

&lt;td align="right"&gt;

&lt;?php
    }
    elseif(($j == 3)){
?&gt;

&lt;td align="left"&gt;

&lt;?php
    }
    else {
?&gt;

&lt;td align="center"&gt;

&lt;?php
    }
?&gt;

&lt;?php
    if($result[$i][$j]!='') {
?&gt;

&lt;?php
    echo $result[$i][$j];
?&gt;

&lt;?php
    echo "&amp;nbsp;";
        }
    }
?&gt;

&lt;/td&gt;

&lt;?php
    }
?&gt;

&lt;/tr&gt;

&lt;?php
    }  ?&gt;
&lt;/tbody&gt;
</code></pre>
