You just need some loops to generate the table data. for example this will generate a row of items with weights from 10 to 35:
echo "<tr>\n";
for ($weight = 10; $weight < 40; $weight += 5)
{
echo "<td>$weight</td>";
}
echo "\n</tr>\n";
You just need to add similar loops for the other values.