original_string: public function toOptions($name)
      {
          $html = '';
          foreach ($this->wei->getConfig($name) as $value => $text) {
              if (is_array($text)) {
                  $html .= '<optgroup label="' . $value . '">';
                  foreach ($text as $v => $t) {
                      $html .= '<option value="' . $v . '">' . $t . '</option>';
                  }
                  $html .= '</optgroup>';
              } else {
                  $html .= '<option value="' . $value . '">' . $text . '</option>';
              }
          }
          return $html;
      }
code: public function toOptions($name)
      {
          $html = '';
          foreach ($this->wei->getConfig($name) as $value => $text) {
              if (is_array($text)) {
                  $html .= '<optgroup label="' . $value . '">';
                  foreach ($text as $v => $t) {
                      $html .= '<option value="' . $v . '">' . $t . '</option>';
                  }
                  $html .= '</optgroup>';
              } else {
                  $html .= '<option value="' . $value . '">' . $text . '</option>';
              }
          }
          return $html;
      }
code_tokens: public function toOptions ( $ name ) { $ html = '' ; foreach ( $ this -> wei -> getConfig ( $ name ) as $ value => $ text ) { if ( is_array ( $ text ) ) { $ html .= '<optgroup label="' . $ value . '">' ; foreach ( $ text as $ v => $ t ) { $ html .= '<option value="' . $ v . '">' . $ t . '</option>' ; } $ html .= '</optgroup>' ; } else { $ html .= '<option value="' . $ value . '">' . $ text . '</option>' ; } } return $ html ; }
docstring: Convert configuration data to HTML select options
  
  @param string $name The name of configuration item
  @return string
docstring_tokens: Convert configuration data to HTML select options