Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

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

Links for php scripts

Moderators: macek, egami, gesf

< 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 !
davnis
New php-forum User
New php-forum User
 
Posts: 5
Joined: Mon Mar 24, 2003 4:05 am

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

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

or hardcode it by

fwrite($fp, $sendername.'
');
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.