This content has been marked as final. Show 4 replies
its ok, just figured it out, you put <p>in the database field!
Would anyone happen to know how to make this work for user entered data? I'm using a PHP database. The text area accepts paragraphs, but when displayed, all of the breaks are removed.
Right after posting this, I found this technote:
Find the Dreamweaver-generated code that displays the data field on the page:
<?php echo $row_myRecordset['myField']; ?>
Modify the code as specified below:
<?php echo nl2br($row_myRecordset['myField']); ?>
I just tested it, and it works beautifully.
Assuming $content holds the text from that textarea, just do this -
$content = nl2br($content);
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
"kllwca" <email@example.com> wrote in message
> Would anyone happen to know how to make this work for user entered data?
> I'm using a PHP database. The text area accepts paragraphs, but when
> displayed, all of the breaks are removed.
Is ther a ASP or ASP.NET version of this trick?