I have three eintries in a textfile.txt:
20100220
Hello
Here is Text \n blah \t even | and & and so on...
I want to read each entrie (line) as a new string in php. I thought of using fopen and fgets. But: Since I'm using special characters like \n in the last line, fgets() would not work because it will terminate the string at \n, right? In a result the last line would be just 'Here is Text '.
How can I read/explode the three lines the right way, so the \n in the last line would be interpreted as a normal string? Thanks!
p.s. By having three lines in my textfile.txt I indirect chose \n as a delimiter, but I could also use another delimiter. what is just the best way to read the content?