graham23s Posted April 20, 2010 Share Posted April 20, 2010 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 Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 20, 2010 Share Posted April 20, 2010 Try \r\n Quote Link to comment Share on other sites More sharing options...
graham23s Posted April 20, 2010 Author Share Posted April 20, 2010 Thanks Ken worked perfect Graham Quote Link to comment Share on other sites More sharing options...
ignace Posted April 20, 2010 Share Posted April 20, 2010 That \n indeed did the trick but you used the wrong editor to open it, notepad requires \r\n Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.