I am making a script to generate a javascript code I use on my website to display scores of a competition. I enter the number of groups that competed in an event, and for each group, I have 3 fields to fill out. One of the three fields is a pulldown menu for the rank of each group. Each pull down menu would be the same, but for the first group, I want '1st' to be selected. For the second group, I want '2nd' to be selected. The reason I need a pull down menu is because if there is a tie for some reason, the placement would go 1, 2, 3, 4-tie, 4-tie, 6 instead of 1,2,3,4,5,6. Im sorry if it is confusing, but I am having a hard time explaining this. If you need an example, I should be able to set something up.
$i = 1;
while ($i <= $groups) {
?>
<tr>
<td align="center">
<select name="rank<?=$i?>">
<option value="1st">1st
<option value="1st - Tie">1st - Tie
<option value="2nd">2nd
<option value="2nd - Tie">2nd - Tie
<option value="3rd">3rd
<option value="3rd Tie ">3rd - Tie
</select>
</td>
<td align="center"><input type="text" name="group<?=$i?>"></td>
<td align="center"><input type="text" maxlength="5" size="5" name="score<?=$i?>"></td>
</tr>
<?
$i++;
This is what I have so far. I want it so when $i = 1, '1st' is selected. When $i = 2, '2nd' is selected, and so on...