Stripping the whitespace - PHP/MySQL

I’m trimming the spaces here…


        $userName = rtrim($userName, ' ');
         $userName = ltrim($userName, ' ');
         $userShout = rtrim($userShout, ' ');
         $userShout = ltrim($userShout, ' ');

But how do I trim the extra lines at the start and end of userShout? In case someone accidentally holds down the enter key and messes up the formatting.

Flash doesn’t use "
" or " " or “\r” or \h or \v or \0… I can’t figure out what to trim…