CR and LF

latch

Active Member
Licensed User
Longtime User
So I am using fgets($file) in php to read lines out of a file that has been generated by writeline in b4a.

Apparently writeline ends a line with linefeed only and fgets wants carriage return and linefeed between each line.

Here's what I have tried with no joy:
B4X:
Writer.Writeline(line& Chr(13))
Writer.Write(line & Chr(13) & Chr(10))

I have several different variables of different character lengths being saved in one text file on separate lines. I could lump all the data comma separated and extract them programatically but a line write and line read is so much snazzier.

Is there a way that remains simple?
 
Top