title: How to Transform a String from Multi-Line to Single-Line in PHP?
body: <p>Is there a PHP string function that transforms a multi-line string into a single-line string?</p>
  
  <p>I'm getting some data back from an API that contains multiple lines. For example:</p>
  
  <pre><code>&lt;p&gt;Some Data&lt;/p&gt;
  
  &lt;p&gt;Some more Data&lt;/p&gt;
  
  &lt;p&gt;Even More Data&lt;/p&gt;
  </code></pre>
  
  <p>I assign that data to a variable, then echo the variable as part/"cell" of a CSV document.</p>
  
  <p>It's breaking my CSV document. 
  Instead of all content showing in one cell (when viewing in OpenOffice Calc), it shows in multiple cells and rows. It should be contained within one cell.</p>
  
  <p>I would like to transform the string into:</p>
  
  <pre><code>&lt;p&gt;Some Data&lt;/p&gt;&lt;p&gt;Some more Data&lt;/p&gt;&lt;p&gt;Even More Data&lt;p&gt;
  </code></pre>
  
  <p>Or, what is the best fix for this?</p>