Hey I’m having problems with my code. I want the first row to have multiple columns based on input.
Min to Max height in steps of five for the row
Min to Max weight in steps of five for the columns
So far I’ve been able to get the length to work but the weight just piles up on one row instead of spreading out on a column.
Help will be greatly appreciated.
[code=php]
<table border= “1” align= “center” style=”width:600px”>’;
for($j=$min_height; $j<=$max_height; $j=$j+5){
echo ‘<tr>
<td> Height ⇢ </br> Weight ⇣</td>
<td>’ . $j . ‘</td>
</tr>
‘;
}
for ($i=$min_weight; $i<=$max_weight; $i= $i+5) {
echo ‘
<tr>
<td>’ . $i . ‘</td>
<td>’ . $i/($j*$j) . ‘</td>
<td>’ . $i/($j*$j) . ‘</td>
<td>’ . $i/($j*$j) . ‘</td>
<td>’ . $i/($j*$j) . ‘</td>
<td>’ . $i/($j*$j) . ‘</td>
</tr>
‘;
}
echo ‘
<tr>
</tr>
</table>