PHP: replacing &#xD; with <br> before printing XML contents using SimpleXML

cspheak

New Member
I know it's probably a very simple issue but still I didn't find a solution...Ok, I'll be brief:suppose to have a so structured XML file:\[code\]<root><item><text>blah blah blah
blah blah blah
blah blah blah
...</text></item></root>\[/code\]My XML is obviously more complex but that's not important since my question is:how do I replace those "& #xD;" with, for instance, html < br> tags?I'm using SimpleXML to read data from XML and tried with:\[code\]echo str_replace("
", "<br>", $message->text);\[/code\]and even with:\[code\]echo str_replace("\n", "<br>", $message->text);\[/code\]but nothing...I need to use SimpleXML for this.
 
Back
Top