AexChecker AexChecker - 1 year ago 80
PHP Question

PHP: replace invalid characters in utf-8 string in

How replace (use regex in PHP5) invalid characters in utf-8 string on white space characters?

Answer Source

use iconv

$text = iconv("UTF-8", "UTF-8//IGNORE", $text);

see the manual.

Cheers