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
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 ''; echo '' . $label . ''; echo '----------'; foreach($items as $item) { $selected = ($item['id'] == $default) ? ' selected="selected" : ''; echo ' . $item['name'] . ''; } echo ''; } else { echo 'There are no venues'; } }