Populate select drop down from a database table

前端 未结 4 1745
迷失自我
迷失自我 2020-12-06 13:42

I have a table (\"venues\") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each.

I want to create a select dr

4条回答
  •  -上瘾入骨i
    2020-12-06 14:18

    assuming you have an array of venues...personally i don't like to mix the sql with other wizardry.

    function displayDropDown($items, $name, $label, $default='') {
      if (count($items)) {
        echo '';
      } else {
        echo 'There are no venues';
      }
    }
    

提交回复
热议问题