Code: Select all
foreach ($childNodes as $value) {
$tmp = $doc->create_element($value->tagname);
$block->append_child($tmp);
}
ex:
original node
<sm>this is some text</sm>
new node
<sm/>
so i need to get the text and put it in there. how can i do that?
thanks,
mcm