Mordax Praetorian Posted April 21, 2008 Share Posted April 21, 2008 Ok, what I'm doing is pretty screwed up, but involves php files writing other php files thus, having linebreaks in the produced files is pretty important I need hence to know how to add a newline to a string so that when I write it to the file (using fwrite) the linebreak appears in the written file Link to comment https://forums.phpfreaks.com/topic/102145-writing-newlines-to-a-file/ Share on other sites More sharing options...
jonsjava Posted April 21, 2008 Share Posted April 21, 2008 add a " \ n" without quotes or spaces. Link to comment https://forums.phpfreaks.com/topic/102145-writing-newlines-to-a-file/#findComment-522847 Share on other sites More sharing options...
Mordax Praetorian Posted April 21, 2008 Author Share Posted April 21, 2008 thanks Link to comment https://forums.phpfreaks.com/topic/102145-writing-newlines-to-a-file/#findComment-522848 Share on other sites More sharing options...
DarkWater Posted April 21, 2008 Share Posted April 21, 2008 On some systems "\r\n" might be necessary I think. Link to comment https://forums.phpfreaks.com/topic/102145-writing-newlines-to-a-file/#findComment-522872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.