Re: Line Breaks in a Textarea



joelbyrd@xxxxxxxxx wrote:
Didn't know exactly where to post this, but: How do I get line breaks
in a textarea? I'm pulling text from a database, and this text
definately has line breaks in it, because I
replaced all the line breaks with <br /> tags ( using the php function
nl2br() ), and <br /> tags showed up in the textarea.

The line-break in textarea is "\n", not <br /> tag. So, if you get data
from one textarea and display in another textarea, you don't need to
convert anything.

.



Relevant Pages

  • Re: newline to <br>
    ... >> I have a textarea on a webpage that gets stored in a database. ... >> I display it, the line breaks as it was typed. ...
    (perl.beginners)
  • Re: newline to <br>
    ... >> I have a textarea on a webpage that gets stored in a database. ... >> I display it, the line breaks as it was typed. ...
    (perl.beginners)
  • Re: Multiline database entries
    ... what I'm trying to do is get a private message sent between two ... >>TEXTAREA and then PHP handles the storing of everything to a MySQL ... >>Using a blob in the database ... > First for that u dont need a blob field but a Text is enough, ...
    (alt.php)
  • accessing records with code stored in a record of 1 database and retrieving information from another
    ... an HTML textarea or table with the username from the other database. ... would display correctly in a text box. ...
    (php.general)
  • Re: Multiline Textbox Problems
    ... I am using the textarea to enter the data from the form into the ... In this site you will find some php code. ... The data was saved in the database field exactly the same. ... displaying come from the database. ...
    (comp.lang.php)