View Single Post
Old 09-15-2012, 02:06 PM   PM User | #1
golffor1
New Coder

 
Join Date: Feb 2008
Posts: 39
Thanks: 0
Thanked 1 Time in 1 Post
golffor1 is an unknown quantity at this point
rtrim() and ltrim()

I understand that rtrim() strips all of the white spaces from the end of a string, and ltrim() strips all of the white spaces from the beginning of a string. But if there are white spaces in the middle of a string will it strip them also? I don't want this to happen....

Would you use the functions like this:

PHP Code:

$myvariable 
$rtrim($myvariable);
$anotherVar $ltrim($anotherVar);

echo 
$myvariable;
echo 
$anotherVar
golffor1 is offline   Reply With Quote