3
So guys, how can I replace in a text, excessive line breaks, making when I have more than one line break in a row these occurrences are replaced by a single one, regardless of how many were placed. For example:
The text typed by the user:
<textarea>
Paragráfo de texto
<br />
<br />
Paragráfo de texto
<br />
Paragráfo de texto
<br />
<br />
<br />
Paragráfo de texto
</textarea>
The text to be presented:
<textarea>
Paragráfo de texto
<br />
Paragráfo de texto
<br />
Paragráfo de texto
<br />
Paragráfo de texto
</textarea>
I need it in php :)
See if this OS link helps http://stackoverflow.com/questions/10757671/how-to-remove-line-breaks-no-characters-from-the-string
– denis