Page 1 of 1

writing to file and new line

Posted: Sun Jun 13, 2004 3:11 am
by pelegk2
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

Posted: Sun Jun 13, 2004 3:13 am
by markl999
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

Posted: Sun Jun 13, 2004 4:27 am
by pelegk2
i did \r\n and it works :)