Re: new lines in textareas?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, March 29, 2008 11:26 pm, Mary Anderson wrote:
>     I have a php script which produces text which is to be displayed
> in
> a textarea.  I have the wrap for the text area set to 'hard'.  I need

Do NOT set the wrap to "hard"

It will only cause you grief in the long run.

It's going to insert newlines where they shouldn't be, and then your
data is corrupt.

> to
> have newlines inserted in the text.
>      "\n" and "<br>" don't work.  They just get quoted literally in
> the
> text.  I suspect I need to use htmlspecialchars , but don't know what
> special character to feed it.

If they are being quoted literally, then something is not right...

\n in particular should flow through just fine.

<br> would be quoted literally if you ran it through htmlspecialchar
or htmlentities.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux