There are two ways you can create the month dropdown list. Screenshot. Here is the code to display the list box and then the collection of selected options. Let’s say I need to create a form that includes a Age drop-down select field. I am trying to populate a Drop down box from results of a mySQL Query, in Php. August 30, 2014, 4:07am #1. VBA to loop through all drop down list options. In the dropdown list menu, only the title is visible but not the contents. Have a look at the first method below. We will keep the data collection while loop inside the JavaScript fillCategory function. A Dropdown list is a combination of items in a list. Macro to Loop Through List of Names and Find Worksheet with Same Name. I'm trying to make a drop down list with PHP using a foreach loop to loop through the data. One is to embed PHP code in the HTML code, that loops through the rows in the database and adds Tag tag is used to create a group of same category options in a drop-down list. This example shows how to use a database to create a simple HTML drop down list. In this tutorial, we'll create a simple date of birth dropdown menu. Use the list() function to store each element of the array into its own variable. hahaha thank you very much, worked a treat. Stelios: 19-11-2012. Here is the demo of multiple selection pull down list box. When a customer name … siamino. Example: You can simply use the PHP foreach loop to create or populate HTML