title: PHP Simple way to replace or remove empty lines with str_replace
body: <pre><code>$line-out = str_replace('\r', '', str_replace('\n', '', $line-in));
  </code></pre>
  
  <p>The above works for me but, I saw a [\n\r] example somewhere and I cannot seem to find it.</p>
  
  <p>I just want to get rid any blank lines. The above is in a foreach loop.</p>
  
  <p>Thanks for teaching.</p>