in reply to Append lines to csv
Either you load your file back into an array and push data on that array, or you could open the file in append mode and add your data at the end. (Of course, there are many other possibilities, as TIMTOWTDI...). The first solution seems to be more reliable, though, in terms of keeping consistent format.