public static function selecty($options, $selected = null, $attribs = array())
    {
        $htmls = array();
        $htmls[] = self::select(null, $attribs, false);
        if (Arr::iterable($options)) {
            foreach ($options as $value => $title) {
                $option_attribs = array('value'=>$value);
                if ((string) $selected === (string) $value) {
                    $option_attribs['selected'] = 'selected';
                }
                
                $htmls[] = self::option($title, $option_attribs);
            }
        }
        $htmls[] = '</select>';
        return join("\n", $htmls);
    }
public static function selecty($options, $selected = null, $attribs = array())
    {
        $htmls = array();
        $htmls[] = self::select(null, $attribs, false);
        if (Arr::iterable($options)) {
            foreach ($options as $value => $title) {
                $option_attribs = array('value'=>$value);
                if ((string) $selected === (string) $value) {
                    $option_attribs['selected'] = 'selected';
                }
                
                $htmls[] = self::option($title, $option_attribs);
            }
        }
        $htmls[] = '</select>';
        return join("\n", $htmls);
    }
public static function selecty ( $ options , $ selected = null , $ attribs = array ( ) ) { $ htmls = array ( ) ; $ htmls [ ] = self :: select ( null , $ attribs , false ) ; if ( Arr :: iterable ( $ options ) ) { foreach ( $ options as $ value => $ title ) { $ option_attribs = array ( 'value' => $ value ) ; if ( ( string ) $ selected === ( string ) $ value ) { $ option_attribs [ 'selected' ] = 'selected' ; } $ htmls [ ] = self :: option ( $ title , $ option_attribs ) ; } } $ htmls [ ] = '</select>' ; return join ( "\n" , $ htmls ) ; }
Get a select list
@param array $options
@param string $selected
@param array $attribs
@return string
Get a select list