Using the example at the following URL: http://www.kavoir.com/2009/02/php-drop-down-list.html
How can I have that drop down menu pre-select one of the options such a
When you echo your option, echo it as follows:
Or you can use js as follows:
var dropDownList = document.getElementById('dropDownListId');
dropDownList.options[optionIndex].selected = true;
I tweaked this function a bit but you can use it:
function generateSelect($name, $options, $optionToSelect) {
$html = '';
return $html;
}