common Posted April 9, 2010 Share Posted April 9, 2010 Hi all I wrote a page that create an csv file after a user inputs a name. (ie mylib.csv). When this file is created it get table headers. Now on a other php file, i want to enter info in the csv file. by opening the file ( fopen('mylib.csv','w') ) and write the info in it ( fputcsv('mylib.csv',split(',' , $value)); ) where $value is the information in an array and this line of code is an foreach statement. Now this works except for that it deletes all the previous information! Can anyone help with this please. Thanks Link to comment https://forums.phpfreaks.com/topic/198095-filesystem-csv/ Share on other sites More sharing options...
litebearer Posted April 9, 2010 Share Posted April 9, 2010 use 'a' rather than 'w' Link to comment https://forums.phpfreaks.com/topic/198095-filesystem-csv/#findComment-1039382 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.