note 95235 deleted from class.domelement by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Dec 2009 19:55:19 +0000 |
| Subject: | note 95235 deleted from class.domelement by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164164@lists.php.net to get a copy of this message | ||
Note Submitter: piopier
----
Falsy method from Daniel Morlock, here is the fix to get the innerHTML really of the selected node :
<?php
function getInnerHTML($Node)
{
$Document = new DOMDocument();
$Document->appendChild($Document->importNode($Node,true));
return $Document->saveHTML();
}
?>