AexChecker AexChecker - 6 months ago 22
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

use iconv

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

see the manual.

Cheers