Convert incorrectly-formatted UTF-8 strings of HTML into correctly-formatted UTF-8 strings of plain text:
htmlentities(iconv('utf-8', 'utf-8//IGNORE', strip_tags($row['title']) ), ENT_QUOTES, 'UTF-8') |
Convert incorrectly-formatted UTF-8 strings of HTML into correctly-formatted UTF-8 strings of plain text:
htmlentities(iconv('utf-8', 'utf-8//IGNORE', strip_tags($row['title']) ), ENT_QUOTES, 'UTF-8') |
You must be logged in to post a comment.
Because strip_tags() does not actually validate the HTML, partial, or broken tags can result in the removal of more text/data than expected. (http://nl3.php.net/strip_tags).
Maybe first use the tidy stuff on it?