Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Removing blank space from a variable

     
3:58 pm on Mar 8, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 15, 2004
posts:192
votes: 0


Hi,

I would like to remove the blank space from the right hand side of a variable (while keeping any space on the left)..

E.g

" Text "

will become...

" Text"

Is there an easy way to do this?

Thanks

PH

3:59 pm on Mar 8, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7242
votes: 0


I think rtrim is the fella for you:-

[uk2.php.net...]

Just happened to be doing the same thing myself right now...

TJ