vegemite Posted May 29, 2009 Share Posted May 29, 2009 Hi All, I'm a PHP newbie and I'm a bit stumped. For some reason my "month" drop-down won't populate with an array's values. Can someone please help me? I'm running PHP v5.2 on Ubuntu Server. Here is the code, minus the unimportant bits: <form action="calendar.php" method="post> <?php $months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); echo '<select name="month">'; foreach ($months as $key => $value) { echo "<option value=\"$key\">$value</option>\n"; } echo '</select>'; ?> </form> In Firefox it simply shows text: January February March April May June July August September October November December Thanks for any help! Ash Link to comment https://forums.phpfreaks.com/topic/160092-wont-populate/ Share on other sites More sharing options...
.josh Posted May 29, 2009 Share Posted May 29, 2009 missing closing quote in method Link to comment https://forums.phpfreaks.com/topic/160092-wont-populate/#findComment-844653 Share on other sites More sharing options...
vegemite Posted May 29, 2009 Author Share Posted May 29, 2009 missing closing quote in method Many thanks! Link to comment https://forums.phpfreaks.com/topic/160092-wont-populate/#findComment-844656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.