Re: [PHP] strip spaces from inside string

2002-04-05 Thread Michael Virnstein
the easiest way would be: ? // - // init var $str = ; $str = abc def ghi; $str = str_replace ( , , $str); echo $str.br; // // output: // abcdefghi // // // or a regex: $str = abc def ghi; $str = ereg_replace( , , $str);

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? ? $string = xyz abc def; $stringWithOutSpaces = implode( , explode( , $string )); ? Or you can use eregi_replace(), but I don't know what the regex would

RE: [PHP] strip spaces from inside string

2002-03-26 Thread Rick Emery
?php $old = xyz abc def; $newstr = ereg_replace( ,,$old); ? -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