tags:

views:

21

answers:

1

I am having an array having multiple elements and i want each element to be inserted in a column of the same row of a csv file using php. I am trying hard but can't find the solution can anyone help me please as soon as possible

+1  A: 

The function fputcsv can do the job.

Mr_Qqn
how can you explain please
Ankur Mukherjee
That's pretty simple :`$fp = fopen('your.csv','a'); fputcsv($fp, $your_array); fclose($fp);`By default it uses the delimiter `,` and the enclosure `"`, but you can change that with the 3rd et 4th parameter of this fonction.
Mr_Qqn