Damijan on code
Code, hints, tutorials ...
Monday, May 30, 2011
How to convert html encoded string to utf8
When I need to convert string from html encoded to e.g. UTF8 I use the next line of code:
html_entity_decode(strip_tags($strBody), null, 'UTF-8')
First I strip all the html tags and then decode the string.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment