< Begginer > How to write into a txt file new line wit

Links for php scripts

Moderators: egami, macek, gesf

Post Reply

Mon Mar 24, 2003 4:19 am

Can you help me to find a solution to have somthing like an database where the info is stored into a txt file one after one in a diferent lines not on the same line ?
I don't know where to put "\n" to get an new line when I save the new information to the data.txt and I have a long chars in sted of line after line.

Here is the code :

$fp = fopen( "data.txt","a");
fwrite($fp, $SenderName, 10000);
fclose( $fp );

Thank you very much !

New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Mon Mar 24, 2003 10:31 am

fwrite($fp, $sendername.'\n');

or hardcode it by

fwrite($fp, $sendername.'
avatar image based upon nasas apod (only updates if I post though)

Post Reply