I have a piece of XML that looks like this:
<root>
<element>Normal,<b>Bold</b></element>
</root>
How can I use PHP to echo everything within <element>
, so that the output is "Normal,<b>Bold</b>
"?
EDIT: Here is my code:
<?php
$xml = simplexml_load_file('xml_file.xml');
$element = $xml->element;
echo $element[1];
?>
I just get "Normal".