var_dump(
preg_replace(
array(
'#[\s\n\\n]*<[\/\s]?(br|/p|/div)[\/\s]?>[\s\n\\n]*#iu', '#\s+#' ),
' ', "A 19th century Dutch walnut secrétaire à abattant")
)
)
);
The result is:
string(102) "A 19th century Dutch walnut secrétaire � abattant"
Why does my Regex breaking special character in PHP?