tags:

views:

34

answers:

3

I'm very new to PHP and I have a small task of displaying a class list from an XML file. I have managed to figure that part out that took longer than expected. I'm running into some descriptions that have html characters that are not displaying on my page. I have tried numerous ways and nothing seems to work for me. Please take a look and let me know what I'm doing wrong.

 $bb = "<P>Dont spend another day <B>manually</B> filtering information from your spreadsheets.</P>";  
 $a = htmlentities($bb);
 $b = html_entity_decode($a);


 echo $book['PRODUCTID']." - ".$book['PRODUCTNAME']." - ".$b."<BR/><BR/>";

Thanks

A: 

something like this will help:

str_replace(array("&lt;", "&gt;"), array("<", ">"), $bb);

that should solve the problem

phalacee
+2  A: 

get rid of

    $a = htmlentities($bb);

just use

    $b = html_entity_decode($bb);
Artelius
A: 

Went with Artelius suggestion. I'm almost certain I tried your suggestion!! Looks like it worked and I'm very much appreciate all your comments.

Thanks!!

Dave
Artelius