QWERTYtech Posted May 3, 2007 Share Posted May 3, 2007 Okay, I have a page I'm working on in PHP and I need a simpler way to autopopulate a dropdown menu. I have dropdown list that i need the numbers 00 to 59 populated without having to hand code it. Can I do this? Link to comment https://forums.phpfreaks.com/topic/49869-dropdown-menu-hellp-please/ Share on other sites More sharing options...
Barand Posted May 3, 2007 Share Posted May 3, 2007 <?php echo '<select name="dropdown">'; for ($i=0; $i<60; $i++) { printf ('<option value="%02d">%02d</option>', $i, $i); } echo '</select>'; ?> Link to comment https://forums.phpfreaks.com/topic/49869-dropdown-menu-hellp-please/#findComment-244675 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.