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

Links for php scripts

Moderators: macek, egami, gesf

davnis
New php-forum User
New php-forum User
Posts: 5
Joined: Mon Mar 24, 2003 4:05 am

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

Postby davnis » 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 !

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

Postby pootergeist » Mon Mar 24, 2003 10:31 am

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

or hardcode it by

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


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron