<tr>
<td>
<select size="1" name="s_prof1" id="s_prof1">
<option >Тол-на</option>
<?php
$result = mysql_query ("SELECT * FROM dobor WHERE var3='s' ",$db);
$myrow = mysql_fetch_array ($result);
do {
printf ("
<option value='%s'>%s</option>", $myrow['var1'],$myrow['var2']);}
while ($myrow = mysql_fetch_array ($result));
?>
</select>
</td>
<td>
<select size="1" name="color_prof" id="color_prof">
<option >цвет</option>
<?php
$result = mysql_query ("SELECT * FROM dobor WHERE var3='cvet' ",$db);
$myrow = mysql_fetch_array ($result);
do {
printf ("
<option value='%s'>%s</option>", $myrow['var1'],$myrow['var2']);}
while ($myrow = mysql_fetch_array ($result));
?>
</select>
</td>
<td>
<select size="1" name="zamer_prof" id="zamer_prof">
<option >ед. изм.</option>
<?php
$result = mysql_query ("SELECT * FROM dobor WHERE var3='zamer' ",$db);
$myrow = mysql_fetch_array ($result);
do {
printf ("
<option value='%s'>%s</option>", $myrow['var1'],$myrow['var2']);}
while ($myrow = mysql_fetch_array ($result));
?>
</select>
</td>
<td><input name="piece1" type="number" id="piece1" size="10" min="0"></td>
<td><input name="price1" type="number" id="price1" size="10" min="0"></td>
<td><input name="sum1" type="number" id="sum1" size="12"></td>
</tr>
<tr>
И зациклить надо так что б каждый следующий цикл менял id s_prof1, color_prof1, zamer_prof1, piece1, price1, sum1 на s_prof2, color_prof2, zamer_prof2 и т.д.
Подскажите кто пожалуйста!!!!