original_string: private static function select_optgroup($groupname, $options, array $selected) {
          if (empty($options)) {
              return '';
          }
          $attributes = array('label'=>$groupname);
          $output = '';
          foreach ($options as $value=>$label) {
              $output .= self::select_option($label, $value, $selected);
          }
          return self::tag('optgroup', $output, $attributes);
      }
code: private static function select_optgroup($groupname, $options, array $selected) {
          if (empty($options)) {
              return '';
          }
          $attributes = array('label'=>$groupname);
          $output = '';
          foreach ($options as $value=>$label) {
              $output .= self::select_option($label, $value, $selected);
          }
          return self::tag('optgroup', $output, $attributes);
      }
code_tokens: private static function select_optgroup ( $ groupname , $ options , array $ selected ) { if ( empty ( $ options ) ) { return '' ; } $ attributes = array ( 'label' => $ groupname ) ; $ output = '' ; foreach ( $ options as $ value => $ label ) { $ output .= self :: select_option ( $ label , $ value , $ selected ) ; } return self :: tag ( 'optgroup' , $ output , $ attributes ) ; }
docstring: Returns HTML to display a select box option group.
  
  @param string $groupname The label to use for the group
  @param array $options The options in the group
  @param array $selected An array of selected values.
  @return string HTML fragment.
docstring_tokens: Returns HTML to display a select box option group .