parsing html to be xml compliant

htmlentities is not meant for this, use htmlspecialchars instead, ie

htmlspecialchars($var, ENT_NOQUOTES, ‘UTF-8’);

a one liner that can save the day…

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Sitecritic.net Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.