Php/Flash adding a space at the end of my variable, driving me crazy!

Hi,

I am using a simple php file to pull data from a mysql database.

This is the code I use to echo the variable back to flash in php (ignore the space in username, kirupua doing that I think !):

echo ‘returned_password=’.$password.’&username=’.$username;

This is what is I get if I view the php file output in a browser:

returned_password=dev&username=dev

There is no space at the end of the username (if you highlight it).

Now in flash I am using a simple LoadVars and sendAndLoad to get this information.

This is what I get when I trace out the returned variable (username):

*The returned Username is :devstar *

If you highlight the above you can see there is a space at the end.

These are the other importants bits of code:
*
var returned_login_lv:LoadVars = new LoadVars();*

envelope_login_lv.sendAndLoad(“http://www.mydomain.com/password.php”,returned_login_lv, “GET”);

trace(returned_login_lv.username);

The returned password has no space at the end? The problem is I want to user the username variable for comparisons but the space messess these up! I know I could delete the last character, but I want to know why it isn’t working.

Any help would be great.

Thanks.

Dev