How to Create a Dynamic Drop Down List in PHP populated from MySQL Database

后端 未结 5 417
一个人的身影
一个人的身影 2020-12-12 07:01

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

5条回答
  •  时光说笑
    2020-12-12 07:45

    Get rid of the inner foreach loop... it is doing nothing for you and move the start and end select tags outside of the while loop.

    $select_query=          "Select name from category";
    $select_query_run =     mysql_query($select_query);
    echo "";
    

提交回复
热议问题