src/bundles/UI/Form.php
public static function make_select( $id, $name, array $options, $selected = array(), $size = 1 ) 
	{	
		if ( !is_array( $selected ) ) 
		{
			$selected = array( $selected );
		}

		$buffer = "";

		foreach( $options as $key => $option )
		{
			if ( ! ( $option instanceof HTML ) )
			{
				$option = HTML::tag( 'option', $option )
					->value( $key );
			}

			if ( in_array( $key, $selected ) )
			{
				$option->selected( true );
			}

			$buffer .= $option->render();
		}

		$element = HTML::tag( 'select', $buffer, array(
			'id' => $id,
			'name' => $name,
			'size' => $size,
		) );

		if ( !static::$builder_enabled )
		{
			 return $element;
		}

		return Builder::handle( 'form_select', $element );
	}
public static function make_select( $id, $name, array $options, $selected = array(), $size = 1 ) 
	{	
		if ( !is_array( $selected ) ) 
		{
			$selected = array( $selected );
		}

		$buffer = "";

		foreach( $options as $key => $option )
		{
			if ( ! ( $option instanceof HTML ) )
			{
				$option = HTML::tag( 'option', $option )
					->value( $key );
			}

			if ( in_array( $key, $selected ) )
			{
				$option->selected( true );
			}

			$buffer .= $option->render();
		}

		$element = HTML::tag( 'select', $buffer, array(
			'id' => $id,
			'name' => $name,
			'size' => $size,
		) );

		if ( !static::$builder_enabled )
		{
			 return $element;
		}

		return Builder::handle( 'form_select', $element );
	}
public static function make_select ( $ id , $ name , array $ options , $ selected = array ( ) , $ size = 1 ) { if ( ! is_array ( $ selected ) ) { $ selected = array ( $ selected ) ; } $ buffer = "" ; foreach ( $ options as $ key => $ option ) { if ( ! ( $ option instanceof HTML ) ) { $ option = HTML :: tag ( 'option' , $ option ) -> value ( $ key ) ; } if ( in_array ( $ key , $ selected ) ) { $ option -> selected ( true ) ; } $ buffer .= $ option -> render ( ) ; } $ element = HTML :: tag ( 'select' , $ buffer , array ( 'id' => $ id , 'name' => $ name , 'size' => $ size , ) ) ; if ( ! static :: $ builder_enabled ) { return $ element ; } return Builder :: handle ( 'form_select' , $ element ) ; }
generate an select

Form::select( 'gender', array( 'F', 'M' ), 0 );

Form::select( 'gender', array( '1' => 'A', '2' => 'B' ), array( 1,2 ), 2 );

@param string		$id			The id that has been generated for us.
@param string 	$name		This is the name
@param array		$options
@param array 		$selected
@param int		$size
@return string
generate an select