Is there a PHP string function that transforms a multi-line string into a single-line string?
I'm getting some data back from an API that contains multiple lines. For example:
<p>Some Data</p>
<p>Some more Data</p>
<p>Even More Data</p>
I assign that data to a variable, then echo the variable as part/"cell" of a CSV document.
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.
I would like to transform the string into:
<p>Some Data</p><p>Some more Data</p><p>Even More Data<p>
Or, what is the best fix for this?