Hi!
You said, you use a for-statemant - so why don't you use varible varibales - I had the same problem with a programm where you can define a variable amount of different questions and you don't have a specific name for those questions the user has to answer. So I just made a for-statement and put on the predefinde varablename the §i-Value and so I got a unique variable-name using variable variables:
Make your form:
for ($i = 1; $i <= $amount; $i++):
echo "<input type=\"input\" name=\"team1$i\" value=\"\" maxlength=\"80\">\n";
echo "<input type=\"input\" name=\"team2$i\" value=\"\" maxlength=\"80\">\n";
echo "<input type=\"input\" name=\"ground$i\" value=\"\" maxlength=\"80\">\n";
echo "<input type=\"input\" name=\"time1$i\" value=\"\" maxlength=\"80\">\n";
endfor;
Working with the variable of the form:
for ($i = 1; $i <= $amount; $i++):
$team1 = 'team1'.$i;
$team2 = 'team2'.$i;
$ground = 'ground'.$i;
$time = 'time'.$i;
// Now to get to the Input of your varibles you defined:
echo ${$team1} . ${$team1} . ${$ground} . ${$time};
endfor;
Hope this code helps.