So guys, how can I replace excessive line breaks in a text, so that when I have more than one line break followed these occurrences are replaced by one, regardless of how many were placed. For example:
The text entered 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 displayed:
<textarea>
Paragráfo de texto
<br />
Paragráfo de texto
<br />
Paragráfo de texto
<br />
Paragráfo de texto
</textarea>
I need this in php:)