Welcome to WebmasterWorld Guest from 54.225.47.124

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

HTML commands in XML message

     
7:27 pm on Nov 7, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Mar 16, 2004
posts:283
votes: 0


I'm using PHP to print the contents of an XML tag. The value of the tag contains some HTML formatting commands. Like this.....

<tag>Mary <b>had</b> a little lamb</tag>.

When I print the contents the browser is ignoring the embedded HTML commands and prints them as text string. What can I do to get them recognised as formatting commands?

P.S. When I view the source the command looks like "&lt;/B&gt;".

7:34 pm on Nov 7, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 2, 2003
posts:95
votes: 0


Try html_entity_decode($str)

This *should* work

8:11 pm on Nov 7, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Mar 16, 2004
posts:283
votes: 0


Game on! Worked perfectly!

Cheers, Pete