How to remove unused line breaks using nl2br
function for this example:
Hello
Nice
Expect output display:
Hello
Nice
and another example:
remove this unused line
remove this unused line
remove this unused line
Hello
remove this unused line
remove this unused line
remove this unused line
remove this unused line
Expect output display:
Hello
So means if the line break more than 3 line, so only set 1 line breaks.
Here is my PHP code:
nl2br($string);
. – Evan Carslake Jun 10 '16 at 04:15