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>Do开发者_StackOverflow中文版nt 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
get rid of
$a = htmlentities($bb);
just use
$b = html_entity_decode($bb);
something like this will help:
str_replace(array("<", ">"), array("<", ">"), $bb);
that should solve the problem
精彩评论