Re: [PHP] strip spaces from inside string

2002-04-05 Thread Michael Virnstein
the easiest way would be: "; // // output: // abcdefghi // // // or a regex: $str = "abc def ghi"; $str = ereg_replace(" ", "", $str); echo $str.""; //if you want to strip any whitespace character: $str = "abc def ghi"; $str = preg_replac

RE: [PHP] strip spaces from inside string

2002-03-26 Thread Rick Emery
-Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 03, 2002 2:01 PM To: PHP General List Subject: [PHP] strip spaces from inside string Say I have a string "xyz abc def" and I want to remove all of the spaces withing the string to create a new one

Re: [PHP] strip spaces from inside string

2002-03-26 Thread Chris Boget
> Say I have a string "xyz abc def" and I want to remove all of the spaces > withing the string to create a new one. What's the best way? Or you can use eregi_replace(), but I don't know what the regex would be. I *think* you can do: Chris -- PHP General Mailing List (http://www.php.ne