I am reading(and slowly trying) the ways to interact with a txt file in php. I have already tried append and it adds data to the end of the txt file But how is a+ different
With a you can just append to the end of the file.
a
With a+ you can read the file too, so you can move the file pointer using fseek and add content somewhere else inside the file.
a+
fseek