Page 1 of 1

Get paragraph from text field

Posted: Wed Apr 15, 2009 4:40 pm
by pschutz93
I want to set up a text field that when submitted is parsed into paragraphs to be written to html code. I can't think of how to do this. Does anyone have any ideas? If more detail is needed, please let me know. Thanks.

Re: Get paragraph from text field

Posted: Wed Apr 15, 2009 5:52 pm
by pickle
Moved to PHP - Code.

Re: Get paragraph from text field

Posted: Wed Apr 15, 2009 11:58 pm
by jaoudestudios
Or if you are happy with <br> or <br /> then you can use nl2br(). This will convert textarea line breaks (user hits enter) to html <br> or <br /> - depending if you are coding xhtml transitional or strict.