I'm creating a forum for learning purposes and I have found a problem. Users can post a message (max 255 characters) but they also can send 255 characters with new lines so my forum appearance looks ugly, example:

ugly display line break

How can I solve this? Any solution?

1 Answers

0
Andy On

You can replace all line breaks with php: $newdata = str_replace("\n" ," ", $data); $data is the string that users input.