Forum Moderators: coopster

Message Too Old, No Replies

formatting text in text area of form, basic CMS

how to format text in a form

         

drooh

3:02 am on Feb 26, 2007 (gmt 0)

10+ Year Member



I am building a very simple blog using php & mysql. I have it almost completed. I am wondering if there is some code that will recognize line breaks and format it when a user submits the comment form.

Essentially like on most forums when you type and start a new paragraph it knows to put in line breaks.

Can anyone point me in the right direction or help me with the right way top search for this information?

eelixduppy

3:05 am on Feb 26, 2007 (gmt 0)



Hello,

I believe you are looking for the handy function nl2br [us2.php.net]. :)

If not, do you mean you want to replace newline characters with something else other than <br/>?

Good luck!