How to generate dynamic selectbox with optgroup

前端 未结 2 590
野趣味
野趣味 2021-01-29 08:22

Hi I am having this mysql table.

CREATE TABLE IF NOT EXISTS `selling_counties` (
  `county_id` int(11) NOT NULL auto_increment,
  `country` varchar(20) collate u         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-29 09:19

    Create a new array like this, with countries as the keys, and the array of counties as each value. Assuming $rows is the array of raw table rows.

    
    
    
    

提交回复
热议问题