/ Published in: PHP
This converts a dom node into a string. Why this is not native to the dom extension is beyond me.
Expand |
Embed | Plain Text
function nodeContent($n, $outer = false) { $d = new DOMDocument('1.0'); $b = $d->importNode($n->cloneNode(true), true); $d->appendChild($b); $h = $d->saveHTML(); return $h; }
You need to login to post a comment.
