Why is my nl2br() function displaying \r instead of a break(<br />)? PHP
<p>When I use the function nl2br($text) it doesn't display the breaks I want it to but instead shows the \r of where the breaks are to be. I am display a confirmation page for a user that shows the detail they entered in the form. </p>

<pre><code>(the confirmation code in php)
// Confirm success with the user
    echo '&lt;p&gt;You have successfully posted a ad.'; 
    echo 'Here is your posting: &lt;br /&gt;&lt;br /&gt;';
    echo 'Title: ' .$title. '&lt;br /&gt;' ;
    echo 'Price $: ' .$price.'&lt;br /&gt;' ;
    echo 'Location: ' .$city. ' ' .$state. '&lt;br /&gt;' ;
    echo '&lt;b&gt;Detail: &lt;/b&gt;' .nl2br($detail). '&lt;br /&gt;';

(The form users fill out)
&lt;div class="fieldwrapper"&gt;
&lt;label for="detail" class="styled"&gt;Detail:&lt;/label&gt;
&lt;div class="thefield"&gt;
    &lt;textarea id="detail" name="detail"&gt;&lt;?php if (!empty($detail)) echo $detail; ?&gt;&lt;/textarea&gt;
</code></pre>

<p>
</p>

<pre><code>(The output)
This is a test\r\n\r\ntesting is good\r\n\r\nWhy doesn\'t it work?
</code></pre>
