PHPverse 2025

Voting

The Note You're Voting On

philipwaynerollins at gmail dot com
15 years ago
You can get the "innerHTML" by nodeValue so

<?php
$doc
= new DOMDocument( );
$ele = $doc->createElement( 'p', 'Sensei Ninja' );
print
$ele->nodeValue;
?>

You can even set it if you want

<?php
$doc
= new DOMDocument( );
$ele = $doc->createElement( 'p' );
$ele->nodeValue = 'Sensei Ninja';
$doc->appendChild( $ele );
print
$doc->saveHTML( );
?>

<< Back to user notes page

To Top