Line break conversion

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Bennettman
Forum Contributor
Posts: 130
Joined: Sat Jun 15, 2002 3:58 pm

Line break conversion

Post by Bennettman »

Is there a script that will make it so that if you include a plain txt file, the points where there's a line break in the text will still have this break inside the page, instead of just carrying on since there's no <br> tag? It would probably work if there was a script to change line breaks into this <br> tag. I just don't know how. It's for a fanfic collection, where the fics will be included into a template page. I don't want to have to waste time and effort putting all the tags into possibly hundreds of pages of writing. Can anyone here help?
User avatar
roninblade
Forum Newbie
Posts: 21
Joined: Thu Jun 13, 2002 7:12 pm

Post by roninblade »

use the nl2br() function
Post Reply