RE: [PHP] removing ALL whitespace from a string

2002-03-11 Thread Demitrious S. Kelly
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* whitespac

Re: [PHP] removing ALL whitespace from a string

2002-03-11 Thread Rasmus Lerdorf
$output = preg_replace('/\s/','',$input); On Mon, 11 Mar 2002, Lee P Reilly wrote: > 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. in

Re: [PHP] removing ALL whitespace from a string

2002-03-11 Thread Andrey Hristov
$new=preg_replace('/\s/','',$old); Best regards, Andrey Hristov - Original Message - From: "Lee P Reilly" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 6:56 PM Subject: [PHP] removing ALL whitespace from a string > Can somebody tell me if there is