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

A

Anonymous

Guest
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 !
 
fwrite($fp, $sendername.'\n');

or hardcode it by

fwrite($fp, $sendername.'
');
 
Back
Top