且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将换行符转换为br

更新时间:2023-02-23 12:14:13

Tomba写道:

你好,

我正在寻找一种方法来转换用textarea写的换行符(带回车)到< br>在html中创建相同的换行符

有没有人可以帮我这个?
我似乎无法找到识别textarea中的换行符的方法



nl2br()


php.net


-

Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com


我注意到了这条消息-ID:< 40 *************** @ glassgiant.com>来自Shawn

Wilson包含以下内容:
有没有人可以帮我这个?
我似乎无法找到识别textarea中的换行符的方法



nl2br()




但请注意这用< br />替换了换行符可以使用某些Doctypes抛出

验证者错误。


-

Geoff Berrow(把垃圾邮件发给电子邮件)

它只是Usenet,没有人死。

我的意见,而不是委员会的,我的。

简单的RFD http://www.ckdog.co.uk/rfdmaker/


Geoff Berrow写道:

我注意到Message-ID:< 40 ************ ***@glassgiant.com>来自Shawn
Wilson包含以下内容:
有没有人可以帮我这个?
我不能似乎找到了识别textarea中的换行符的方法



nl2br()



但请注意,这会用<替换换行符。 br />这可能会导致某些Doctypes验证错误。




No.


:o)

-

Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com


hi there,

I am looking for a way to convert line breaks that are written in a textarea
(with an enter) to <br> to create the same line break in html

is there anyone who can help me with this?
I can''t seem to find a way to recognize the linebreaks in the textarea

thanks,
Steven De Groote

--
Webmaster of:
http://www.f1technical.net/
http://formule1.go2.be/

Tomba wrote:

hi there,

I am looking for a way to convert line breaks that are written in a textarea
(with an enter) to <br> to create the same line break in html

is there anyone who can help me with this?
I can''t seem to find a way to recognize the linebreaks in the textarea



nl2br()

php.net

--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com


I noticed that Message-ID: <40***************@glassgiant.com> from Shawn
Wilson contained the following:
is there anyone who can help me with this?
I can''t seem to find a way to recognize the linebreaks in the textarea



nl2br()



But be aware that this replaces line breaks with <br /> which can throw
up validator errors with some Doctypes.

--
Geoff Berrow (put thecat out to email)
It''s only Usenet, no one dies.
My opinions, not the committee''s, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/


Geoff Berrow wrote:

I noticed that Message-ID: <40***************@glassgiant.com> from Shawn
Wilson contained the following:
is there anyone who can help me with this?
I can''t seem to find a way to recognize the linebreaks in the textarea



nl2br()



But be aware that this replaces line breaks with <br /> which can throw
up validator errors with some Doctypes.



No.

:o)
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com