title: PHP replace double-lines with one HTML Break
body: <p>I am trying to replace all \n\n on my server with the <code>&lt;BR&gt;</code> tag so that a single \n does not turn into <code>&lt;BR&gt;</code>.</p>
  
  <p>Example:</p>
  
  <pre><code>Hello,\n\nThis is an\nexample.\n\nThanks!
  </code></pre>
  
  <p>goes to:</p>
  
  <pre><code>Hello,&lt;BR&gt;This is an\nexample,&lt;BR&gt;Thanks!
  </code></pre>
  
  <p>(notice the single \n was not replaced)</p>
  
  <p>When I do the following in PHP, it does not replace the two lines with a break:</p>
  
  <pre><code>$str = str_replace("\n\n", "&lt;br /&gt;", $str);
  </code></pre>