* @return string HTML
*/
public static function input( $name, $size=false, $value=false, $attribs=array() ) {
- $attributes = array();
+ $attributes = array( 'name' => $name );
+
if( $size ) {
$attributes['size'] = $size;
}
$attributes['value'] = $value;
}
- $attributes['name'] = $name;
-
return self::element( 'input', $attributes + $attribs );
}