DOMNode::insertBefore

DOMNode::insertBefore

(PHP 5, PHP 7)

DOMNode::insertBefore Adds a new child before a reference node

Description

public DOMNode DOMNode::insertBefore ( DOMNode $newnode [, DOMNode $refnode ] )

This function inserts a new node right before the reference node. If you plan to do further modifications on the appended child you must use the returned node.

Parameters

newnode

The new node.

refnode 登录查看完整内容