is there a way of appending source html into a DOMElement? Something like this:

$trElement->appendSource("<a href='?select_user=4'>Username</a>");

it would parse that fragment and then append it. thanks in advance!

Accepted Answer

You are looking for

- DOMDocumentFragment::appendXML — Append raw XML data

Example from Manual:

$doc = new DOMDocument();
$f = $doc->createDocumentFragment();
echo $doc->saveXML(); 
Written by Gordon
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki