In article <001301c12476$3420f300$82602c3f@2pqjp01>,
 [EMAIL PROTECTED] (Jack Dempsey) wrote:

> > 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"

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

Or if you want to strip all typres of whitespace (space chars, tabs, 
newlines, carriage returns)...

$string = preg_replace('|\s|','',$string);

-- 
CC

-- 
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