You can use strtok() with ' ' as the delim

-----Original Message-----
From: Lee P Reilly [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 8:56 AM
To: PHP List
Subject: [PHP] removing ALL whitespace from a string

Can somebody tell me if there is a function that will remove *all*
whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning,
the end, and the middle?. Something like chop(), trim()?

e.g. input = "   1    2     3    ad "
e.g. output = "123ad"

Thanks,

Lee


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to