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 :'( Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.