PHP Code Function get Dom Node Outer HTML
PHP Function Code to Get the outerHTML of a DOM Element in PHP
Home
Short:
function outerHTML ( DOMNode $elm ) { $doc = new DOMDocument(); $doc->appendChild($doc->importNode($elm, true)); return $doc->saveHTML(); }
source code home