public function tag($name, Array $options = array(), $content = null, $open = false)
    {
        if (!$name) {
            return '';
        }
        $htmlOptions = '';
        foreach ($options as $key => $value) {
            $htmlOptions .= ' ' . $key . '="' . \htmlspecialchars($value, \ENT_COMPAT) . '"';
        }
        if ($content !== null) {
            return '<' . $name . $htmlOptions . '>' . $content . '</' . $name . '>';
        } else {
            return '<' . $name . $htmlOptions . (($open) ? '>' : ' />');
        }
    }
public function tag($name, Array $options = array(), $content = null, $open = false)
    {
        if (!$name) {
            return '';
        }
        $htmlOptions = '';
        foreach ($options as $key => $value) {
            $htmlOptions .= ' ' . $key . '="' . \htmlspecialchars($value, \ENT_COMPAT) . '"';
        }
        if ($content !== null) {
            return '<' . $name . $htmlOptions . '>' . $content . '</' . $name . '>';
        } else {
            return '<' . $name . $htmlOptions . (($open) ? '>' : ' />');
        }
    }
public function tag ( $ name , Array $ options = array ( ) , $ content = null , $ open = false ) { if ( ! $ name ) { return '' ; } $ htmlOptions = '' ; foreach ( $ options as $ key => $ value ) { $ htmlOptions .= ' ' . $ key . '="' . \ htmlspecialchars ( $ value , \ ENT_COMPAT ) . '"' ; } if ( $ content !== null ) { return '<' . $ name . $ htmlOptions . '>' . $ content . '</' . $ name . '>' ; } else { return '<' . $ name . $ htmlOptions . ( ( $ open ) ? '>' : ' />' ) ; } }
Constructs an html tag

@param string $name Tag name
@param array $options Tag options
@param string $content Content
@param bool $open True to leave tag open
@return string
Constructs an html tag