add_child
add_child($tag,$inner_html); - add a child DOM element to the element and get its DOM interface (available from version 4.9.26)
the input Function accepts parameters:
$tag – tag of the element to add.
$inner_html – internal html of the added element
After testing, the function returns the result of its work to the script :
DOM element interface – an object that allows you to quickly perform any operations with the found element, the return value type XHEInterface