<html> <head> <title>Online PHP Script Execution</title> </head> <body> <?php function makeMonths(){ $months = [1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; // Make the month pull-down menu: echo '<select name="month">'; foreach ($months as $key => $value) { echo "\n<option value=\"$key\">$value</option>"; } echo '</select>'; } //end makeMonths function ?> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more