HighDots Forums  

PHP: replace line breaks with <br>

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss PHP: replace line breaks with <br> in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
M36T
 
Posts: n/a

Default PHP: replace line breaks with <br> - 07-15-2004 , 10:13 AM






Well, the title pretty much says it. But just to re-phrase it... How do you use
PHP to convert line breaks to <br> tags? I mean, like when I'm typing into this
litle form here, it automaticly creates its own <br> tags.

Thanks,
Jake


Reply With Quote
  #2  
Old   
Mark
 
Posts: n/a

Default Re: replace line breaks with <br> - 07-15-2004 , 10:19 AM






If you mean text from a database then

<?php echo nl2br($row_Recordset1['MyFieldName']); ?>


"M36T" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Well, the title pretty much says it. But just to re-phrase it... How do
you use
PHP to convert line breaks to <br> tags? I mean, like when I'm typing into
this
litle form here, it automaticly creates its own <br> tags.

Thanks,
Jake




Reply With Quote
  #3  
Old   
-Rb
 
Posts: n/a

Default Re: replace line breaks with <br> - 07-15-2004 , 10:48 AM




"M36T" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Awesome! I didn't even know they had that function! lol

Thanks,
Jake
The php documentation is available at:

< http://www.php.net/docs.php >

there is a windows .chm that is very helpful
to have on your pc.

HTH

-Rb



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.