Convert incorrectly-formatted UTF-8 strings of HTML into correctly-formatted UTF-8 strings of plain text.


/ Published in: PHP
Save to your folder(s)

Useful for taking incorrectly-formatted UTF-8 strings containing HTML data, and converting them to correctly-formatted UTF-8 plain text.

A handy tool for displaying HTML stored in a database.


Copy this code and paste it in your HTML
  1. htmlentities(iconv('utf-8', 'utf-8//IGNORE', strip_tags($row['title']) ), ENT_QUOTES, 'UTF-8')

Report this snippet


Comments


You need to login to view comments.