MortimerJazz Posted January 16, 2007 Share Posted January 16, 2007 Is it using substr_replace()? Quote Link to comment Share on other sites More sharing options...
taith Posted January 16, 2007 Share Posted January 16, 2007 $nospaces = str_replace(" ", "", $withspaces); Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 16, 2007 Share Posted January 16, 2007 [quote author=MortimerJazz link=topic=122650.msg506076#msg506076 date=1168960705]Is it using substr_replace()?[/quote]i know the [url=http://php.net/trim]trim()[/url] function has always worked for me. but taith's method seems to be more robust and efficient. thanks for the advice taith! Quote Link to comment Share on other sites More sharing options...
MortimerJazz Posted January 16, 2007 Author Share Posted January 16, 2007 thanks taith Quote Link to comment Share on other sites More sharing options...
taith Posted January 16, 2007 Share Posted January 16, 2007 no prob... trim() removes spaces from either side of a string, my str_replace() above removes all spaces from the string, wether it is at the end or between words... Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 16, 2007 Share Posted January 16, 2007 [quote author=taith link=topic=122650.msg506108#msg506108 date=1168963374]no prob... trim() removes spaces from either side of a string, my str_replace() above removes all spaces from the string, wether it is at the end or between words...[/quote]AH that's the difference. good to know. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.