This question already has an answer here:
- Replace multiple newlines, tabs, and spaces 10 answers
Let's say for example somebody enters into a textarea:
line
line
I want it to be displayed as
line line
And if someone enters
line
line
It displays as
line
line
Stackoverflow does this too, but I want to know how to do it specifically with PHP.
Thanks.
</div>