File: Inserting A Line Break

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
User avatar
Templeton Peck
Forum Commoner
Posts: 45
Joined: Sun May 11, 2003 7:51 pm

File: Inserting A Line Break

Post by Templeton Peck »

I'm just writing to a normal text file, it works fine and all but it puts all the date on one single line.

Just wondering how to get line breaks? like write a string and then have a line break
Doolittle
Forum Newbie
Posts: 19
Joined: Sun May 04, 2003 11:45 pm

Post by Doolittle »

\n
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Writing to a HTML-file use: "<br>"
Writing to a plain-text-file (ASCII) use: "\n".
User avatar
Templeton Peck
Forum Commoner
Posts: 45
Joined: Sun May 11, 2003 7:51 pm

Post by Templeton Peck »

I've tried that, instead of putting a line break it prints a funny character, any other idea's?
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

Check out my thread... in the end i had a similar problem but was able to fix it...there is also some code you can look @...
viewtopic.php?t=8951
Post Reply