$string = str_replace(' ','',$string);

-----Original Message-----
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 14, 2001 12:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] space in strings

Some time ago I needed a function that remove space in strings.
Sure there is one that remove space at the start of the string, and one
that removes trailing space - but is there one that removes ALL spaces
from a string? Like:

$string = "this is a string";
rmspc($string);
// $string is now "thisisastring"

Martin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to