newline question
<p>I want to detect a carriage return or a newline character when a user enters data into a textarea. What is the best way to handle this? I've tried str_replace with escape characters but carriage returns and newlines are not detected.</p>

<hr>

<p>OK, say I type the following into a textarea:</p>

<pre><code>The summer was hot this year
but next year is supposed to be cooler.
</code></pre>

<p>I want to detect the CRs. In this case, there is one.</p>
