Jump to content

Problems with DOM in PHP


dymon

Recommended Posts

Hi,

 

I use this function to create a new element, but sometimes I get an warning that I can not understand.

 

function create_element($element, $content, $attribute, $attr_val) {
  global $xml;
  $elem = $xml->create_element($element);
  $elem->set_content($content);
  if ($attribute != '') {
    $elem->set_attribute($attribute, $attr_val);
  }
  return $elem;
}

 

The warning I get is:

Warning: set_content(): unterminated entity reference Plaques of Pregnancy - PUPPP) in /var/www/atlas/submit/upload.php on line 47

 

Why does this error appear? I will be glad for any ideas.

 

Thanks.

 

Dymon

Link to comment
https://forums.phpfreaks.com/topic/42815-problems-with-dom-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.