Trim blank lines from textarea submission
<p>I have a form that submits text from textarea. The text can be formatted, i.e. have line breaks and paragraphs, however I want to remove blank lines at the end of the text. Shall I use rtrim or preg_replace?</p>

<p>Can I use something like this to clear blank lines, carriage returns and tabs?</p>

<pre><code>rtrim($_POST['inviteMsg'], "\n\t\r");
</code></pre>
