//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 \n"; foreach($values as $k => $v) { $s = ($selected_id == $k) ? " selected='selected'" : ''; $k = intval($k); $v = htmlentities($v, ENT_QUOTES, 'UTF-8'); $buff .= "\n"; } $buff .= "\n"; return $buff; }