> 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 be. I *think* you can do: <? $string = "xyz abc def"; $stringWithOutSpaces = eregi_replace( " ", "", $string ); ?> Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php