latch Active Member Licensed User Longtime User Dec 8, 2012 #1 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: Code: 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?
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: Code: 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?
Erel B4X founder Staff member Licensed User Longtime User Dec 9, 2012 #2 This line is correct: Code: Writer.Write(line & Chr(13) & Chr(10)) Upvote 0