Answer the question
In order to leave comments, you need to log in
How to write multiple lines to csv file?
for ($k=1; $k <= 2; $k++) {
$res = $curl->get('');
foreach ($products as $product) {
$list = array(
'Строка для заголовков столбцов',
'Делаю строку используя добытые данные\переменные для записи'
);
$fp = fopen('import.csv', 'w');
foreach ($list as $line) {
fputcsv($fp, explode(',', $line), ";");
}
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