PHP: fix incorrectly-formatted UTF-8 strings

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')

One thought on “PHP: fix incorrectly-formatted UTF-8 strings

Leave a Reply