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.

If you don't use nl2br(), and the text has line breaks in it, then those
line breaks will actually show up as line breaks in the textarea. You
don't need the <br /> tags.

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
.



Relevant Pages

  • Line Breaks in a Textarea
    ... in a textarea? ... I'm pulling text from a database, ... replaced all the line breaks with tags (using the php function ...
    (comp.lang.php)
  • Re: Work with HTML and INPUT
    ... > I have one application in PHP where the user can send the HTML tags through a textarea input. ...
    (alt.php)
  • Re: How can I allow certain HTML tags within a textarea?
    ... HTML tags because otherwise I'll be exposed to XSS and other tricks). ... This will tell you about all the valid tags in textarea with id txtA then you can do ... tagss = tagss & tag & vbCr ...
    (microsoft.public.scripting.vbscript)
  • Work with HTML and INPUT
    ... I have one application in PHP where the user can send the HTML tags through a textarea input. ... How I can to liberate the send the HTML tags and reload this code in the textarea without have problems with the tags inserted by user? ...
    (alt.php)
  • Re: Work with HTML and INPUT
    ... you don't have to worry about html error. ... > through a textarea input. ... > How I can to liberate the send the HTML tags and reload this code in the ...
    (alt.php)