note 101243 modified in class.domelement by danbrown

From: Date: Sun, 05 Dec 2010 16:40:56 +0000
Subject: note 101243 modified in class.domelement by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174624@lists.php.net to get a copy of this message
Hi! Combining all th comments, the easiest way to get inner HTML of the node is to use this function: <?php function get_inner_html( $node ) { $innerHTML= ''; $children = $node->childNodes; foreach ($children as $child) { $innerHTML .= $child->ownerDocument->saveXML( $child ); } return $innerHTML; } ?> --was-- Hi! Combining all th comments, the easiest way to get inner HTML of the node is to use this function: function get_inner_html( $node ) { $innerHTML= ''; $children = $node->childNodes; foreach ($children as $child) { $innerHTML .= $child->ownerDocument->saveXML( $child ); } return $innerHTML; } http://php.net/manual/en/class.domelement.php

« previous php.notes (#174624) next »