pQuery\DomNode::detach PHP Method

detach() public method

Detach node from parent
See also: delete()
public detach ( boolean $move_children_up = false )
$move_children_up boolean Only detach current node and replace it with child nodes
    function detach($move_children_up = false)
    {
        if (($p = $this->parent) !== null) {
            $index = $this->index();
            $this->parent = null;
            if ($move_children_up) {
                $this->moveChildren($p, $index);
            }
            $p->deleteChild($this, true);
        }
    }
DomNode