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
I would throw another parameter into the generateSelect function that defines what the default is. You can do this with either the id of the option or by the name. For the following, I'll use name to make it clearer.
function generateSelect($name = '', $options = array(), $default = '') {
$html = '';
return $html;
}
/* And then call it like */
$html = generateSelect('company', $companies, 'Apple');