Reputation: 24748
I've read plenty of answers but never found a solution.
Why doesn't this work with trim?
$test = trim('Whatever this is');
echo $test;
This work:
$test= preg_replace('/\s+/', ' ', 'Whatever this is');
echo $test;
Expected:
Whatever this is
Why doesn't the first one work, when the second one does? No strange characters as I write them directly in the PHP code.
Please don't close this one too quickly
Upvotes: 0
Views: 76