Re: [PHP] Enter to BR
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 would be no other choice for TEXTAREA wrapping. The rest suck. I *hate* sites that don't bother to do this, so you're stuck with this stupid box that requires you to scroll like crazy or send them badly-wrapped data. Okay, I've spewed enough vile on TEXTAREA now :-) -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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]
Re: [PHP] Enter to BR
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 (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] -- 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]
RE: [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 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 PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Enter to BR
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 split() function, but I wouldn't know how... Joeri Vankelst -- 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] -- 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]
RE: [PHP] Enter to BR
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]
Re: [PHP] Enter to BR
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) : web-wise-wizard.com/html-tutorials/html-form-forms-textarea-wrap.html Next, learn a little about linefeed / newline here : http://www.faqts.com/knowledge_base/view.phtml/aid/901/ And from there, getting br's from \n's is a snap, check out : http://www.php.net/manual/function.nl2br.php It's up to you from there :-) regards, Philip Olson On Tue, 26 Jun 2001, 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 -- 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] -- 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]
Re: [PHP] Enter to BR
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 Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA He who dies with the most toys... is *still* DEAD! -- 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]
RE: [PHP] Enter to BR
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 6:17 PM To: [EMAIL PROTECTED] 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 split() function, but I wouldn't know how... Joeri Vankelst -- 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] -- 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]
RE: [PHP] Enter to BR
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] 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 split() function, but I wouldn't know how... Joeri Vankelst -- 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]
RE: [PHP] Enter to BR
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 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... nl2br http://at.php.net/manual/de/function.nl2br.php michi -- Sent through GMX FreeMail - http://www.gmx.net -- 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] -- 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]