I have a TEXT field in a MySQL database and I use a form to fill it. When I display it on an HTML page it is not formatted at all. Any carriage returns are joined together so that it's just a mess.
How can I format this? I tried replacing \n or chr(13) with </p><p> but there are still problems.
Try: nl2br($text);
I wanted more then just </br> though, I wanted text indents etc.
Anyway, I got it. Instead of replacing chr(13) I replaced chr(13).chr(10) which would be CRLF (carriage return/line feed).