zartzar Posted March 3, 2009 Share Posted March 3, 2009 Im using a for loop to create a drop down menu, but it just prints one option, 30: print "<select name='income'>"; for($i=1; $i<30; $i++); { print "<option value='$i'>$i</option>"; } print "</select>"; What did i do wrong :'( Link to comment https://forums.phpfreaks.com/topic/147789-this-is-driving-me-nuts-for-loop/ Share on other sites More sharing options...
premiso Posted March 3, 2009 Share Posted March 3, 2009 print "<select name='income'>"; for($i=1; $i<30; $i++) { print "<option value='$i'>$i</option>"; } print "</select>"; You had a semicolon ; after the for portion. Link to comment https://forums.phpfreaks.com/topic/147789-this-is-driving-me-nuts-for-loop/#findComment-775768 Share on other sites More sharing options...
zartzar Posted March 3, 2009 Author Share Posted March 3, 2009 d'oh Link to comment https://forums.phpfreaks.com/topic/147789-this-is-driving-me-nuts-for-loop/#findComment-775774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.