'.$label.''; } } /** * html_parseAttributes * * Function created to help deal with HTML tag attributes. * * @param array $attr Array of HTML attributes */ function html_parseAttributes($attr = array()) { if (count($attr) > 0) { foreach ($attr as $key => $value) { $attributes .= ' '.$key.'="'.$value.'"'; } } return $attributes; } /** * html_genericElement * * Generic HTML element function to help create html elements. * * @param string $name * @param array $attr Array of HTML attributes */ function html_genericElement($name, $attr = array()) { $element = '<'.$name.html_parse_attributes($attr); if (W3C_STANDARD == 'XHTML') { $element .= ' /'; } $element .= '>'; return $element; } /** * html_form_select * * HTML form element, select. * * @param array $attr Array of HTML attributes */ function html_form_select($attr = array(), $options = array()) { $numOptions = count($options); $select = ''; foreach ($options as $name => $value) { $select .= ''; } return $select; } /** * html_form_select * * HTML form element, select. * * @param string $value Value of the textarea field. This isn't an explicit HTML textarea attribute, so is provided separately. * @param array $attr Array of HTML attributes */ function html_form_textarea($value, $attr = array()) { return ''.$value.''; } ?>