Welcome to WebmasterWorld Guest from 54.166.117.130

Forum Moderators: coopster & jatar k

HTML commands in XML message

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

10+ Year Member



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)

10+ Year Member



Try html_entity_decode($str)

This *should* work

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

10+ Year Member



Game on! Worked perfectly!

Cheers, Pete

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month