public static function renderAttributes(array $attributes)
    {
        $html = [];
        foreach ($attributes as $key => $value) {
            $escaped = htmlentities($value, ENT_QUOTES, 'UTF-8', false);
            $html[] = is_numeric($key) ?
                ($escaped . '="' . $escaped . '""')
                :
                ("$key=\"$escaped\"");
        }
        return count($html) > 0 ? ' ' . implode(' ', $html) : '';
    }
public static function renderAttributes(array $attributes)
    {
        $html = [];
        foreach ($attributes as $key => $value) {
            $escaped = htmlentities($value, ENT_QUOTES, 'UTF-8', false);
            $html[] = is_numeric($key) ?
                ($escaped . '="' . $escaped . '""')
                :
                ("$key=\"$escaped\"");
        }
        return count($html) > 0 ? ' ' . implode(' ', $html) : '';
    }
public static function renderAttributes ( array $ attributes ) { $ html = [ ] ; foreach ( $ attributes as $ key => $ value ) { $ escaped = htmlentities ( $ value , ENT_QUOTES , 'UTF-8' , false ) ; $ html [ ] = is_numeric ( $ key ) ? ( $ escaped . '="' . $ escaped . '""' ) : ( "$key=\"$escaped\"" ) ; } return count ( $ html ) > 0 ? ' ' . implode ( ' ' , $ html ) : '' ; }
Renders HTML tag attributes.

@param array $attributes
@return string
Renders HTML tag attributes .