Answer the question
In order to leave comments, you need to log in
How to write data to excel file in PHP?
There are 3 variables:
$id = $names_new[$j][0];
$old = $names_new[$j][1];
$new = $names_old[$i][1];
You need to write them to the Excel file line by line:
A BC
$id $old $new
Tried like this:
$id = $names_new[$j][0];
$old = $names_new[$j][1];
$new = $names_old[$i][1];
$tofile = $id . ';' . $old . ';' . $new . "\n";
$bom = "\xEF\xBB\xBF";
@file_put_contents($fileall, $bom . $tofile . file_get_contents($fileall));
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