public static function html_select($name, $options, $current = null, $properties = array())
{
$id = isset($properties['id']) ? $properties['id'] : $name;
$output = '<select id="' . $id . '" name="' . $name . '"';
foreach ($properties as $key => $value) {
$output .= " {$key}=\"{$value}\"";
}
$output .= ">\n";
foreach ($options as $value => $text) {
$output .= '<option value="' . $value . '"';
if ($current == (string) $value) {
$output .= ' selected="selected"';
}
$output .= '>' . $text . "</option>\n";
}
$output .= '</select>';
return $output;
}