Re: remove whitespace
| From: | Henrik Hansen | Date: | Wed, 08 Nov 2000 21:28:30 +0000 |
| Subject: | Re: remove whitespace | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24390@lists.php.net to get a copy of this message | ||
David Otton <djo@jawbone.freeserve.co.uk> wrote:
> Hi - I suspect there is a function to do this, but I can't find it.
>
> I want to remove extraneous whitespace-like characters from a string,
> so
>
> "this is\n a \t string with \nweird spacing"
>
> becomes
>
> "this is a string with weird spacing"
>
str_replace(" ", "", $variable);
then it replaces if there are over 1 space, i dont think there are any
faster wats to do this.
--
Henrik Hansen