Jump to content

New line in .txt file


graham23s

Recommended Posts

Hi Guys,

 

I'm using this code to write emails to a .txt file:

 

        $myFile = "leads/emails.txt";
        $fh = fopen($myFile, 'a') or die ("can't open leads file!");
        $stringData = "$conEM\n";
        fwrite($fh, $stringData);
        fclose($fh);  

 

It works great but it doesn't create a new line after every email they are all like: email1email2email3 etc

 

i thought the \n would have done the trick.

 

thanks for any help guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/199161-new-line-in-txt-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.