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
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Sun Jun 13, 2004 3:11 am
i am writing text into a text file
and i want the line to go to a new line on every certain time
how do i do that?
thnaks in advance
peleg
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Sun Jun 13, 2004 3:13 am
Write a "\n" to the file.
Eg
fputs($fp, $whatever."\n");
Be sure to use "\n" and not '\n' and depending on your operating system you may need to use \r\n instead of \n
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Sun Jun 13, 2004 4:27 am
i did \r\n and it works