Re: Removing spaces from a string
| From: | Monte Ohrt | Date: | Thu, 11 Jan 2001 20:56:29 +0000 |
| Subject: | Re: Removing spaces from a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-34096@lists.php.net to get a copy of this message | ||
$string = preg_replace("/\s+/","" $string);
That will get spaces as well as special chars like \t,\n,\r and \f
Ray Iftikhar wrote:
>
> How would I go about removing the space from a string?
> (ie. 3 doors down -> 3doorsdown)
> Last I checked I dont think that there was a specific function for it.
>
> Thanx in advance,
> Ray...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/