I am writing a TXT file using PHP. I want to insert actual line breaks into the TXT file wherever necessary. I have tried all combinations of \\n \\r \\r\\n \\n\\r ... but t
You must write \n in a double-quoted string (in single-quoted strings no parsing takes place):
\n
"foo\r\nbar"
Further reference:
http://es2.php.net/manual/en/language.types.string.php