highlight( "<$tag>" ); $attr = null; foreach ($attributes as $value) { if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; } return $this->highlight( "<$tag$attr>" ); } function single ($tag, &$attributes) { if($attributes == null) return $this->highlight( "<$tag />" ); $attr = null; foreach ($attributes as $value) { if($value[1]) $attr .= $value[0].'="'.$value[1].'" '; } return $this->highlight( "<$tag $attr/>" ); } // template for end tags function close ($tag) { return $this->highlight( "" ); } function template_end() { return null; } function highlight($string) { $string = str_replace("&","&",$string); return ''.str_replace("<","<",$string).''; } } //END class HTML_output ?>