Blog

Sometimes if we read an external document like a PDF we got some 'strange' whitespace characters that cannot be removed using trim(), so one good solution for this is to use str_replace()

$value = str_replace("\xA0", ' ', $value);