On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote:
> This should be a quick one, but I can't seem to wrap my brain around it.
> All I need to do is replace leading or trailing spaces with underscores.  If
> there is spaces in between words, leave them alone.

$fix = ereg_replace("(^ )|( $)", "_", $checkme);

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
/* This bit of chicanery makes a unary function followed by
a parenthesis into a function with one argument, highest precedence. */
             -- Larry Wall in toke.c from the perl source code

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