centralfm Posted March 14, 2007 Share Posted March 14, 2007 I'm trying to create a text file in php to generate a playlist. The problem is that I cannot manage to create a new line in the text file. Using /n still places text in the same line and just inserts a symbol to indicate the 'new line'. Using <br> just works when viewing the document in HTML (which is not what i need in this case). But what I want is to physically insert a new line in the text file so that when i open the generated file using notepad i see that there are actually new lines in the document and so that the playlist can be read normally with a music player. Any help would be appreciated! Thanks Andre` Link to comment https://forums.phpfreaks.com/topic/42659-new-line-in-text-file-help/ Share on other sites More sharing options...
zq29 Posted March 14, 2007 Share Posted March 14, 2007 You need to use back slashes rather than forward slashes. Also, different operating systems use different characters for newlines, either \r, \n, or both \r\n - It's a safe bet to use the \r\n Link to comment https://forums.phpfreaks.com/topic/42659-new-line-in-text-file-help/#findComment-206958 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.