If you have some sites that do not rely on a framework you could use this function to generate a simple HTML select.
Note: It won't preselect multiple values.
You can download the the code from the link below (usually doesn't look good in a post)

gethtmlselectphp

//echo getHTMLSelect('dropdown', array(0 => "", 1 => "'test'"", 2 => "test2"), @$_REQUEST['sel']);

/**
* Returns an HTML dropdown menu.
*
* @param string $name HTML select name
* @param array $values options key value
* @param int $selected_id currently selected ID
* @param string $attr several attributes that will be added in
<select>* @return string</select>
<select>*/</select>
<select>function getHTMLSelect($name = 'dropdown', $values = array(), $selected_id = 0, $attr = '') {</select>
<select>$buff = "</select><select name="$name">n";</select>
<select name="$name">foreach($values as $k =&gt; $v) {</select>
<select name="$name">$s = ($selected_id == $k) ? " selected='selected'" : '';</select>
<select name="$name">$k = intval($k);</select>
<select name="$name">$v = htmlentities($v, ENT_QUOTES, 'UTF-8');</select>
<select name="$name">$buff .= "<option value="$k">$v</option>n";</select>
<select name="$name">}</select>

$buff .= "n";
return $buff;
}