Re: Removing WhiteSpace
| From: | Jay Greenspan | Date: | Sat, 09 Sep 2000 22:43:57 +0000 |
| Subject: | Re: Removing WhiteSpace | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16019@lists.php.net to get a copy of this message | ||
the trim() functions should the trick
http://www.php.net/manual/function.trim.php
>
>A bit lazy I guess, but I'm having trouble trying to replace multiple
spaces
>in a string.
>
>I'm concatenating variables from a form such as
>$string=$Salutation.$First_Name.$Initial.$Surname
>The string could be "Mr Grant Walters" and I want "Mr Grant Walters".
>
>I looked at preg_replace but don't really understand it. I keep getting
>empty strings.
>
>Regards
>
>GRANT WALTERS
>Walters & Associates, P O Box 13-043, Johnsonville, Wellington, New Zealand
>Phone: +64 4 4765175 CellPhone: 025 488265
>
>
>--
>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
>