Try this:
$data = "שם פרטי,שם משפחה,עיר\na,b,c\n1,2,3"; // need to use " for \n
file_put_contents("myexcel.csv","\xEF\xBB\xBF"); // BOM with UTF-8 to csv
file_put_contents("myexcel.csv",$data,FILE_APPEND); // add more data
Hope it helps.
GK10
- 371
- 4
- 12