How can you strip whitespaces in PHP's variable?
I know this comment PHP.net.
I would like to have a similar tool like tr
for PHP such that I can run simply
tr -d " " ""
I run unsuccessfully the function php_strip_whitespace
by
$tags_trimmed = php_strip_whitespace($tags);
I run the regex function also unsuccessfully
$tags_trimmed = preg_replace(" ", "", $tags);