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)
[code language="php"]
//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
$buff .= "n";
return $buff;
}
[/code]
Hi there,
I have already seen it somethere...
Great post. You seem to have a good understanding that how to create a professional drop down menu. When I entering your blog, I felt this. Come on and keep writing your blog will be more attractive. To Your Success!
Thanks!