Created
November 30, 2019 21:45
-
-
Save airarm/2b5be5c93dc2f070d85f070aabdea8e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function DOMInnerHTML(DOMNode $element) | |
{ | |
$innerHTML = ""; | |
$children = $element->childNodes; | |
foreach ($children as $child){ | |
$innerHTML .= $element->ownerDocument->saveHTML($child); | |
} | |
return $innerHTML; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment