attributes as $attr) { echo ' ' . esc_html($attr->nodeName) . '="' . esc_attr($attr->value) . '"'; } }