Forum Moderators: coopster
I have a problems that is almost breaking my head.
I am trying to read files with php, and it is working perfectly well until the file comes with some empty lines (which happens frequently).
I have tried everything but I still do not have good results.
Could someone please help me with this?
are you using a d-loaded CMS many will add tons of <p> and/or <br>
obviously the problem lies where the content is added
the following will probably get rid of "empty lines"
however it will not address the real issue:
Why is it happpening?
You might let us know how you content is entered.
in the meanwhile try this:
<?php
$str = str_replace('\r\n', '', $str)
?>
// where str is your text
<edit>Typo</edit>