title: Saving line breaks with preg_replace
body: <p>I have this code for saving line breaks in text area input to database:</p>
  
  <pre><code>$input = preg_replace("/(\n)+/m", '\n', $input);
  </code></pre>
  
  <p>On examining the input in the database, the line breaks are actually saved.<br />
  But the problem is when I want to echo it out, the line breaks do not appear
  in the output, how do I preserve the line breaks in input and also echo them
  out. I don't want to use <code>&lt;pre&gt;&lt;/pre&gt;</code>.</p>