Strip End of Line Characters PHP
I have a php script that takes input from a form and emails the results. Everything works fine, but users often use the [Return] key at the end of lines and I would like to strip those characters from the variable.
What I usually get is something like this (2 paragraphs) ...
The quick brown fox
jumped over the lazy dog
The quick brown fox
jumped over the lazy dog
The quick brown fox
jumped over the lazy dog
The quick brown fox
jumped over the lazy dog
The quick brown fox
jumped over the lazy dog
The quick brown fox
jumped over the lazy dog
But what I want is this (still 2 paragraphs, but with end-of line characters stripped and paragraphs still intact) ...
The quick brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog
The quick brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog
Can anyone help?
Many thanks
Will
Eight bytes walk into a bar. The bartender asks, âCan I get you anything?â
âYeah,â reply the bytes. âMake us a double.â