Jump to content

Getting extra fields in for loop


fabiez

Recommended Posts

  for($i=1; $i<=$round; $i++){
    print "<tr><td align='left' valign='top'><input type='text' name='number$i' maxlength='2' size='2' /></td>\n ";
    print "<td align='left' valign='top'><input type='text' name='score$i' maxlength='1' size='1' /></td>\n ";
	print "<td align='left' valign='top'><select name='team$i'>\n";
	print "<option value='-'>-<option>\n";
	print "<option value='Home'>Home<option>\n";
	print "<option value='Away'>Away<option>\n";
	print "</select></td></tr>";
  }

What I'm having trouble with is that for every option tag there is an empty option tag added. How do I get rid of those empty option tags? Thankful for any help.

Link to comment
https://forums.phpfreaks.com/topic/291317-getting-extra-fields-in-for-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.