Some comments on these answers :-)
nl2br is the correct answer.
preg is like shooting a fly with a cannon, and str_replace would be right,
if nl2br wasn't right, which it is.
And every TEXTAREA tag on the planet should have WRAP=VIRTUAL in it. In
fact, if *I* were in charge of HTML, there
See the nl2br() function.
In article 9h8ct3$n0t$[EMAIL PROTECTED] you write:
How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or
a P tag?
Someone sugested I use the split() function, but I wouldn't know how...
Joeri Vankelst
--
PHP General Mailing List
How can I get an Enter typed in a HTML textfield to be
inerpreted as a BR or a P tag? Someone sugested I use the
split() function, but I wouldn't know how...
You'll want to use nl2br(), then.
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Use nl2br()
--zak
- Original Message -
From: Joeri Vankelst [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 4:16 PM
Subject: [PHP] Enter to BR
How can I get an Enter typed in a HTML textfield to be inerpreted as a BR
or
a P tag?
Someone sugested I use the
try nl2br()
--Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Three resources that should interest you greatly :
First, learn about the html wrap attribute. Although the following url is
very long, it should be of use as it contains some examples (search google
for terms html textarea wrap for more info) :
On Tue, 26 Jun 2001 07:46, Joeri Vankelst wrote:
How can I get an Enter typed in a HTML textfield to be inerpreted as a
BR or a P tag?
Someone sugested I use the split() function, but I wouldn't know how...
Joeri Vankelst
nl2br() is just the tool for this.
--
David Robley
nl2br()
http://www.php.net/nl2br
Jason Lotito
www.NewbieNetwork.net
PHP Newsletter: http://www.newbienetwork.net/ciao.php
PHP, MySQL, PostgreSQL Tutorials, Code Snippets, and so much more
-Original Message-
From: Joeri Vankelst [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001
I've never needed to assign Enter to = p or br just make sure your using
textarea name=foo cols=20/textarea
and you should have no problems
peter
-Original Message-
From: Joeri Vankelst [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 8:17 AM
To: [EMAIL PROTECTED]
or you could use preg_replace
preg_replace(/\n/, BR\n, $var);
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 2:56 AM
To: Joeri Vankelst
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Enter to BR
How can I get
10 matches
Mail list logo