AexChecker AexChecker - 11 months ago 59
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