This is a discussion on "Seeing Line Breaks?" within the PHP Forum section. This forum, and the thread "Seeing Line Breaks? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Seeing Line Breaks?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Seeing Line Breaks?
When a comment is left on the blog, when someone hits enter they move down a line and type some more, but when the comment is saved to the database the line breaks are not preserved and kept, so when the comment is displayed it displays without a single line break, is there a way to solve this? Right now I have told people to use '<br />' but there must be a way!
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|
|
||||
|
Re: Seeing Line Breaks?
Fixed it myself in the end using nl2br($string);
Read: http://www.plus2net.com/php_tutorial/line-breaks.php
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Seeing Line Breaks?
__________________
echo "Take it easy, ".$CloudedVision; .links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; organization: ARMIES6; } <quote>"I think it's wrong that only one company makes the game Monopoly" - <name>Steven Wright</name></quote>
Last Blog Entry: More Cheat Sheets (Jul 12th, 2008)
Last edited by CloudedVision; Feb 24th, 2008 at 20:59. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Big Breaks | jtyoungs | Web Page Design | 11 | Dec 7th, 2007 10:59 |
| Line breaks | alexgeek | Other Programming Languages | 1 | Nov 1st, 2007 01:51 |
| retrieving and displaying line breaks | nate2099 | Databases | 1 | Jul 13th, 2007 08:56 |
| eref, textarea, line breaks | ppgpilot | PHP Forum | 2 | Jan 20th, 2007 18:13 |
| Adding RETURN line breaks to a database | Lizard- | Classic ASP | 2 | Aug 19th, 2004 09:49 |