deansaddigh Posted January 21, 2010 Share Posted January 21, 2010 I have a php script that i want to display 52 weeks in a select <option> tag code here <?php $i = 0; while ($i <= 52) { '<option value="'.$i.'"> '.$i.' </option>'; $i++; } ?> Doesnt seem to populate the option box with anything any help? thanks in advance Link to comment https://forums.phpfreaks.com/topic/189331-while-loop-not-working/ Share on other sites More sharing options...
gwolgamott Posted January 21, 2010 Share Posted January 21, 2010 <?php $i = 0; while ($i <= 52) { echo "<option value=\"".$i."/"> \"".$i."\" </option>"; $i++; } ?> try something like that Link to comment https://forums.phpfreaks.com/topic/189331-while-loop-not-working/#findComment-999453 Share on other sites More sharing options...
deansaddigh Posted January 21, 2010 Author Share Posted January 21, 2010 IM such an idiot thanks alot Link to comment https://forums.phpfreaks.com/topic/189331-while-loop-not-working/#findComment-999455 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.