public function select($name, $options = array(), $selected = null, $attributes = array())
{
$attributes['id'] = $this->id($name, $attributes);
$attributes['name'] = $name;
$html = array();
foreach ($options as $value => $display) {
if (is_array($display)) {
$html[] = $this->optgroup($display, $value, $selected);
} else {
$html[] = $this->option($value, $display, $selected);
}
}
return '<select' . $this->html->attributes($attributes) . '>' . implode('', $html) . '</select>';
}