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;
    }
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;
    }
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 ; }
Convert configuration data to HTML select options

@param string $name The name of configuration item
@return string
Convert configuration data to HTML select options