Home PHP How to solve error: 'PHP Warning: DOMDocument::createElement(): unterminated entity reference' when creating a new element using the DOMDocument object model.
 
 
 

How to solve error: 'PHP Warning: DOMDocument::createElement(): unterminated entity reference' when creating a new element using the DOMDocument object model.

PDF Print E-mail

Problem: How to solve error: 'PHP Warning:  DOMDocument::createElement(): unterminated entity reference' when creating a new element using the DOMDocument object model.

DOMDocument = Represents an entire HTML or XML document; serves as the root of the document tree.  (PHP 5)
DOMDocument::createElement()  = Create new element node. (PHP 5)

 

Now to the solution!

 

Solution:

 

  • Use the htmlentitites function to convert all applicable characters to HTML entities.
  • $dom->createElement('value', htmlentities($text_value));
    • htmlentitites = Convert all applicable characters to HTML entities (PHP 4, PHP 5)

 

Problem should be solved!!! ;-)


+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!