Jump to content

Stripping Line Breaks


verycleanteeth

Recommended Posts

I know this should be easy to do, but I'm just not sure how. I've got a string storing some HTML like so:

[code]
$mess = '
<table id="sometable">
    <tr>
    <td>
        <table id="thatguyfromwham">
            <tr>
            <td>
                      stuff to read
            </td>
            </tr>
        </table>
    </td>
    </tr>
</table>
';[/code]

Is there a function I can call to strip all the line breaks out? My table is showing up right now with all sorts of extra whitespace because of all the extra lines, and I want to keep the HTML readable.
Link to comment
https://forums.phpfreaks.com/topic/15853-stripping-line-breaks/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.