So far, the other answers have you going the long way. While variable variables will work, it is less efficient and harder to code than just using variables. So, you name your form vars like so
<form name=form>
<?php
$max=4;
for ($i=0;$i<$max;$i++){
print "<input type=text name=last_name[$i]>";
}
?>
<input type=submit name=action value="Go!">
</form>
Then you just either compact them with serialize and stick them into one database element, or, if they need to be in seperate rows you can either for next or while across them. Like any other array. It works well with multipart forms where you have say 10 records and each has 5 parts. In that case you can even use a 2 dimensional array like so:
<input name=arg[$i][$j]>
when making the form fields. Then, just make an array in your file (or grab the field names from the database) to show in the form next to each field. You can use that $count%3 or whatnot to make a three column table like so:
$maxx=10;
$maxy=5;
$fields=array("last_name","first_name","address_1","address_2","city_state_zip");
for ($y=0;$y<$maxy;$y++){
for ($x=0;$x<$maxx;$x++){
print $fields[$y];
print "<input type=text name=store[$x][$y]>";
print '<BR>';
}
print '<HR>Record number: '.$y;
}
should build the part of the form you need.