|
DOMNode::appendChildAdds new child at the end of the children Description
public DOMNodefalse DOMNode::appendChild(DOMNode
$node)This function appends a child to an existing list of children or creates a new list of children. The child can be created with e.g. DOMDocument::createElement, DOMDocument::createTextNode etc. or simply by using any other node. When using an existing node it will be moved. Parameters
Return Values
The node added or Errors/ExceptionsMay throw a DOMException with the following error codes:
ExamplesThe following example will add a new element node to a fresh document. Example #1 Adding a child
Example #2 Nested children See Also
|