I have a csv file with the following data:
DATA1-1 DATA1-2 DATA1-3 DATA2-1 DATA2-2 DATA2-3 DATA3-1 DATA3-2 DATA3-3
I need to append more data to the file so it will look like this:
DATA1-1 DATA1-2 DATA1-3 DATA1-4 DATA1-5 DATA2-1 DATA2-2 DATA2-3 AAAAAAA BBBBBBB DATA3-1 DATA3-2 DATA3-3 AAAAAAA BBBBBBB
I have tried fgetcsv() and fputcsv() but could not figure it out. Whenever I try to write anything to the first line, my data always goes to the second line. This needs to be done in php. Any help?