protected function optgroup($options, $label, $selected)
{
$html = array();
foreach ($options as $value => $display) {
$html[] = $this->option($value, $display, $selected);
}
return '<optgroup label="' . $this->html->entities($label) . '">' . implode('', $html) . '</optgroup>';
}