homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
HTML commands in XML message
PeteM




msg:1264520
 7:27 pm on Nov 7, 2004 (gmt 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;".

 

XMLMania




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

Try html_entity_decode($str)

This *should* work

PeteM




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

Game on! Worked perfectly!

Cheers, Pete

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved