private static function element($name, array $attrs)
    {
        $str = "<$name";

        foreach ($attrs as $name => $value) {
            if ($value === null) {
                continue;
            } elseif ($value === true) {
                $str .= " $name";
            } elseif ($value !== false) {
                $str .= ' '.$name.'="'.htmlspecialchars($value).'"';
            }
        }

        return "$str>";
    }
private static function element($name, array $attrs)
    {
        $str = "<$name";

        foreach ($attrs as $name => $value) {
            if ($value === null) {
                continue;
            } elseif ($value === true) {
                $str .= " $name";
            } elseif ($value !== false) {
                $str .= ' '.$name.'="'.htmlspecialchars($value).'"';
            }
        }

        return "$str>";
    }
private static function element ( $ name , array $ attrs ) { $ str = "<$name" ; foreach ( $ attrs as $ name => $ value ) { if ( $ value === null ) { continue ; } elseif ( $ value === true ) { $ str .= " $name" ; } elseif ( $ value !== false ) { $ str .= ' ' . $ name . '="' . htmlspecialchars ( $ value ) . '"' ; } } return "$str>" ; }
Creates an html element.

@param string $name  Element name
@param array  $attrs Element attributes

@return string
Creates an html element .