I am trying to create a dynamic drop down list using PHP and mysql database. I have written the following code and its giving me the output, but the problem is that its show
You may try it
$select_query= "Select name from category"; $select_query_run = mysql_query($select_query); $select_query_array= mysql_fetch_array($select_query_run) $select = ""; foreach ($select_query_array as $val) { $select .= "".$val['name'].""; } $select = ""; echo $select;
Hope It will work