src/bundles/UI/HTML.php
public static function attr( $attr = array() ) {
		$buffer = " ";
		foreach( $attr as $key => $value ) {
		
			switch( $key ) {
		
				case 'class':
				if ( is_array( $value ) ) { $value = implode( ' ', $value ); }
				break;
		
				case 'style':
				if ( is_array( $value ) ) {
					$style = $value; $value = "";
					foreach( $style as $k => $v ) {
						$value .= $k.':'.$v.';';
					}
				}
				break;
			}
		
			$buffer .= $key.'="'.$value.'" ';
		}
		
		return substr( $buffer, 0, -1 );
	}
public static function attr( $attr = array() ) {
		$buffer = " ";
		foreach( $attr as $key => $value ) {
		
			switch( $key ) {
		
				case 'class':
				if ( is_array( $value ) ) { $value = implode( ' ', $value ); }
				break;
		
				case 'style':
				if ( is_array( $value ) ) {
					$style = $value; $value = "";
					foreach( $style as $k => $v ) {
						$value .= $k.':'.$v.';';
					}
				}
				break;
			}
		
			$buffer .= $key.'="'.$value.'" ';
		}
		
		return substr( $buffer, 0, -1 );
	}
public static function attr ( $ attr = array ( ) ) { $ buffer = " " ; foreach ( $ attr as $ key => $ value ) { switch ( $ key ) { case 'class' : if ( is_array ( $ value ) ) { $ value = implode ( ' ' , $ value ) ; } break ; case 'style' : if ( is_array ( $ value ) ) { $ style = $ value ; $ value = "" ; foreach ( $ style as $ k => $ v ) { $ value .= $ k . ':' . $ v . ';' ; } } break ; } $ buffer .= $ key . '="' . $ value . '" ' ; } return substr ( $ buffer , 0 , - 1 ) ; }
generates html attribute string

@param array 	$attr
generates html attribute string