I have got a XML file that I am trying to read into a database
using PHP. When I encounter a HTML & symbol I seem to get a line break in the content.
The content I have is something like this:
<BriefDesc>Liverpool & Man Utd go head to head</BriefDesc>
When I try to read this is, it is output as:
Liverpool
&
Man Utd go head to head
I am using the usual way of reading in XML files
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
Everything else is working fine its just when I seem to hit a HTML
& character, I am using the htmlentities() function to change to HTML chars from the string before it gets written to the XML file and thats working fine, its just when i try to read it back in, i get this line break. I have tried upping the file buffer to allow more data to be read in but this has no effect.
Any ideas?
Tony