如何使用数组动态命名表单输入

I Have something like this, the form generated dynamically from database, so number of rows is not fixed, My question to name these form input in a dynamic way so I can retrieve their values from post into PHP insert script

<form>
<table>
<tr>
  <td>Qty</td>
  <td>Name </td>
  <td>Price</td>
</tr>

<tr>
  <td><input type="text" name="" ></td>
  <td><input type="text" name="" > </td>
  <td><input type="text" name="" ></td>
</tr>

<tr>
  <td><input type="text" name="" ></td>
  <td><input type="text" name="" > </td>
  <td><input type="text" name="" ></td>
</tr>

<tr>
  <td><input type="text" name="" ></td>
  <td><input type="text" name="" > </td>
  <td><input type="text" name="" ></td>
</tr>
.
.
.
.
.

</table>
  <input type="submit" name="sendform" value"send" >
  </form>

</div>

You can do this by

Use unique id that represent your row uniquely .Like this:

echo "<table>";
while($r = mysql_fetch_array($q))
{
  $name = $id;
  ehco <tr>";
  echo "<td><input type='text' name='".name.".name'/></td>";
  echo "<td><input type='text' name='".name.".qty'/></td>";
  echo "<td><input type='text' name='".name.".price'/></td>";
}

echo '</table>';

Being your id unique you will get unique name for each control.