Re: [PHP] Line breaks in PHP.
On Wednesday, December 17, 2003, at 03:10 PM, Philip J. Newman wrote: Question: When you hit enter in a text box is that classified as a \n? generally, yes. depending on the client platform, it might be an \r\n or \r (I've heard)... justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Line breaks in PHP.
Ok thats cool, guess i'll look for both, and only one in the data - Original Message - From: Justin French [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 5:35 PM Subject: Re: [PHP] Line breaks in PHP. On Wednesday, December 17, 2003, at 03:10 PM, Philip J. Newman wrote: Question: When you hit enter in a text box is that classified as a \n? generally, yes. depending on the client platform, it might be an \r\n or \r (I've heard)... justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Line breaks in PHP
I think nl2br() is what you're looking for. RenzE Matt Davis wrote: I have a form that edits the text on a web page by putting the data into a db and then outputting to the webpage when it is called. When I enter my text into my form I use the return key to start new lines, but when the text appears on my webpage it has no line breaks so the text just wraps to the width of the page. Is there any way of PHP picking up these line breaks so that the text will be formatted on my web page as it was on my form. Thanks Matt. -- 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] Line breaks in PHP
check out the nl2br() function. HTML does not recognize the line breaks, it needs BR for that. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 11:29 AM To: Php Mailing List Subject: [PHP] Line breaks in PHP I have a form that edits the text on a web page by putting the data into a db and then outputting to the webpage when it is called. When I enter my text into my form I use the return key to start new lines, but when the text appears on my webpage it has no line breaks so the text just wraps to the width of the page. Is there any way of PHP picking up these line breaks so that the text will be formatted on my web page as it was on my form. Thanks Matt. -- 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] Line breaks in PHP
When getting the data out of a mySQL table with PHP, use: $TextArea = nl2br($TextField); If you are opening it into a form you shouldn't need any formatting as it will detect the new lines and if using a TEXTAREA the lines will be as you typed them initially. If you want to save BRs when saving the data into the table, use the above but then you won't need it when you pull the data back out. Martin. -Original Message- From: Jason Lotito [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 20:30 To: [EMAIL PROTECTED]; Php Mailing List Subject: RE: [PHP] Line breaks in PHP -Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 1:29 AM To: Php Mailing List Subject: [PHP] Line breaks in PHP I have a form that edits the text on a web page by putting the data into a db and then outputting to the webpage when it is called. When I enter my text into my form I use the return key to start new lines, but when the text appears on my webpage it has no line breaks so the text just wraps to the width of the page. Is there any way of PHP picking up these line breaks so that the text will be formatted on my web page as it was on my form. Thanks Matt. http://www.php.net/nl2br Check out that function. that is what you need. Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn. -- 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]