Posted By

X3Maverick on 11/21/08


Tagged

database php html xhtml strip String tags text remove convert utf-8 inconv htmlentities striptags correct


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

jakecamara
ginoplusio
localhorst
vali29
daipratt


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


 / Published in: PHP
 

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.

  1. htmlentities(iconv('utf-8', 'utf-8//IGNORE', strip_tags($row['title']) ), ENT_QUOTES, 'UTF-8')

Report this snippet  

You need to login to post a comment.