Is there php function to remove the space inside the string? for example:
$abcd="this is a test"
I want to get the string:
$abcd="thisisatest"
How to do that?
$abcd = str_replace(' ', '', 'this is a test');
The following will also work
$abcd="this is a test";
$abcd = preg_replace('/( *)/', '', $abcd);
echo $abcd."\n"; //Will output 'thisisatest';
or
$abcd = preg_replace('/\s/', '', $abcd);
See manual http://php.net/manual/en/function.preg-replace.php