I have a problem with trim() function in PHP. I have some text code with whitespaces. This code contain only spaces.
When I use trim in that way:
$text = trim($v);
var_dump($text);
I got:
string(2) " "
When I use urlencode to check what is incorect:
$text = trim(urlencode($v));
var_dump($text);exit;
I got:
string(6) "%C2%A0"
Why trim() can't remove this whitespace? How I can create my own trim() function to remove these whitespaces?
Thanks.