Skip to content

Delete an element

Benjamin Kaiser edited this page Apr 15, 2021 · 1 revision

Description

Deletes an element, including the element's descendant elements:

boolean delete ( integer $node )
Type Name Description
integer $element The ID of the element to delete.

Return: TRUE on success or FALSE on error.

Example

// add a topmost element
$element = $f3t->add(0, 'Main');
 
// add child element
$child1 = $f3t->add($element, 'Child 1');
 
// add another child element
$child2 = $f3t->add($element, 'Child 2');
 
// delete the "Child 2" element
$f3t->delete($child2);
Clone this wiki locally