Return to Snippet

Revision: 20679
at November 22, 2009 11:17 by Znupi


Updated Code
<?php

function outerHTML($e) {
	$doc = new DOMDocument();
	$doc->appendChild($doc->importNode($e, true));
	return $doc->saveHTML();
}

?>

Revision: 20678
at November 22, 2009 11:16 by Znupi


Initial Code
<?php

function outerXML($e) {
	$doc = new DOMDocument();
	$doc->appendChild($doc->importNode($e, true));
	return $doc->saveHTML();
}

?>

Initial URL
http://it-ride.blogspot.com/2009/11/domelement-innerhmtl.html

Initial Description
Gets the outerHTML of a DOMElement. For a more optimal version check the URL.

Initial Title
DOMElement outerHTML

Initial Tags
DOM

Initial Language
PHP