public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }
public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }
public static function combo ( $ name , array $ options , $ value = null , array $ attributes = array ( ) ) { $ input = self :: setAttr ( $ attributes , '<select{{attr}}>' , $ name , 'select' ) ; foreach ( $ options as $ key => $ val ) { $ input .= '<option value="' . self :: entities ( $ val ) . '"' ; if ( $ value === $ val ) { $ input .= ' selected' ; } $ input .= '>' . $ key . '</option>' ; } return $ input . '</select>' ; }
Create a select combo based in an array

@param string      $name
@param array       $options
@param string|null $value
@param array       $attributes
@return string
Create a select combo based in an array