Yes, but you can create a loop to do the inserts. I have not done this in PHP, but I've done this numerous times in other database languages. Name your variables in a pattern like fieldA1, fieldA2, fieldB1,fieldB2, etc. etc.. Then, no matter if there are two rows or twenty two, feed that to the loop. Something like...
$rowltr = "A"
$fieldnum = "1"
$maxfields = 5
$maxrow = 10
while $rowltr < $maxrow
while $fieldnum < $maxfields {
build your sql statement here
$sql = "insert into table1 values ("...
field".$rowltr.$fieldnum.", "
}
** execute it here
$result = db_query($sql)
}
This obviously isn't complete, but it should set you on the right track.