Jump to content

for loop not working?


kuyarey

Recommended Posts

Anything wrong I'm doing? Supposed to show a drop down value of 1 - 31 days but the drop down option is just showing the word "day".. Thanks for the help

 

<select name="day">
<option value="">Day</option>
<?php // Print out 31 days:
for ($i = 1; $i <= 31; $i++) {
print "<option value=\"$i\">$i</option>";
}
?>
</select>
Link to comment
https://forums.phpfreaks.com/topic/297011-for-loop-not-working/
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.