Answer the question
In order to leave comments, you need to log in
Why fopen('parsed_data.csv', 'w') only works 1st time?
Such a thing, I do page parsing, and when I click parse, it writes to a file:
// Save text to Excel CSV file
$list = array (
array('aaa', 'bbb', 'ccc', 'dddd'),
array('123', '456', '789'),
array('"aaa"', '"bbb"')
);
$fp = fopen('parsed_data.csv', 'w');
foreach ($list as $fields) {
fputcsv($fp, $fields);
}
fclose($fp);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question