Hmm... it sounds like it might be a deal with your formatting. Do you have something like this:
<textarea>
content
</textarea>
(Note the spaces before the HTML tags)
The spaces before the </textarea> and after content will appear in the variable.
You can either change your HTML or use rtrim()