note 48608 deleted from function.dom-domdocument-createentityreference by didou
| From: | didou@php.net | Date: | Sat, 02 Apr 2005 21:46:49 +0000 |
| Subject: | note 48608 deleted from function.dom-domdocument-createentityreference by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87370@lists.php.net to get a copy of this message | ||
Note Submitter: jon at mysql dot com
----
The argument to this function is the character entity reference minus the leading "&"
and trailing ";" characters. E.g.,
<?php
$doc =
DOMDocument::LoadHTML("<html><body><p></p></body></html>");
$t1 = $doc->createTextNode("H");
$e1 = $doc->createEntityReference("auml");
// character entity for "ä" is "ä"
$t2 = $doc->createTextNode("user");
$p = $doc->getElementsByTagName("p")->item(0);
$p->appendChild($t1);
$p->appendChild($e1);
$p->appendChild($t2);
echo $doc->saveHTML();
// output: "Häuser"
?>
This method does not appear to accept numeric arguments.