Manual do PHP
Anterior |  | Próxima

# DOMNode->insertBefore

(no version information, might be only in CVS)

DOMNode->insertBefore -- Adds new child at the end of the children

## Description

object DOMNode->insertBefore ( object newnode [, object refnode])

This function inserts the new node newnode right before the node refnode. The return value is the inserted node. If you plan to do further modifications on the appended child you must use the returned node. If refnode is not supplied then newnode is appended to the children.

Throws DOMException if node cannot be inserted.

Anterior | Principal | Próxima
DOMNode->hasChildNodes | Acima | DOMNode->isSameNode