php8.5
Home/ Manual/ dom / domparentnode/ DOMParentNode::append

DOMParentNode::append

PHP function Edit on GitHub ✎

(PHP 8)

Appends nodes after the last child node

Description

DOMParentNode::append(DOMNode|string ...$nodes): void

Appends one or many nodes to the list of children after the last child node.

Parameters

nodes

The nodes to append. Strings are automatically converted to text nodes.

Return Values

Void

Errors/Exceptions

Changelog

VersionDescription
8.3.0Calling this method on a node without an owner document now works. Previous_hierarchy_exception

See Also

  • DOMParentNode::prepend

Source: reference/dom/domparentnode/append.xml · from the official PHP manual (php/doc-en)