Posted By

Znupi on 11/22/09


Tagged

DOM domelement


Versions (?)

DOMElement outerHTML


 / Published in: PHP
 

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

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

  1. <?php
  2.  
  3. function outerHTML($e) {
  4. $doc = new DOMDocument();
  5. $doc->appendChild($doc->importNode($e, true));
  6. return $doc->saveHTML();
  7. }
  8.  
  9. ?>

Report this snippet  

You need to login to post a comment.