title: Remove new lines from string and replace with one empty space
body: <pre><code>$string = "
  put returns between paragraphs
  
  for linebreak add 2 spaces at end
  
  ";
  </code></pre>
  
  <p>Want to remove all new lines from string.</p>
  
  <p>I've this regex, it can catch all of them, the problem is I don't know with which function should I use it.</p>
  
  <pre><code>/\r\n|\r|\n/
  </code></pre>
  
  <p><code>$string</code> should become:</p>
  
  <pre><code>$string = "put returns between paragraphs for linebreak add 2 spaces at end ";
  </code></pre>