Questions tagged [fputcsv]

fputcsv is a PHP function that formats a line (passed as a fields array) as CSV and writes it (terminated by a newline) to the specified file handle. `fputcsv` support started with PHP version 5.1.0.

334 questions
-2
votes
3 answers

Array into a CSV file using same id in PHP

I have an array called : $messages with this data. (Generated dynamically). How can I create a CSV file which contains 3 columns (txt, time and name) for each txt_id with the values ? array(3) { [0]=> array(5) { ["txt"]=> string(3)…
yuhell
  • 15
  • 4
-2
votes
2 answers

From CSV to array with headerkeys, now back to CSV

Our Story: (short version below if you're eager to troubleshoot) This question is asked after extensively searching for a way to get a multidimensional array (with named keys) back into it's CSV file. You might say: "But this is covered on multiple…
RkdL
  • 102
  • 11
-3
votes
1 answer

fputcsv - columns from table displayed in one column

I have a problem with putting data from mysql database to csv file. The column headers are ok but rest of rows from table are in one column. Please help..
Kermit
  • 31
  • 7
-3
votes
1 answer

PHP Generated CSV File filled with html crap from webhost instead of data?

I am using PHP to generate a csv file with a first name and second name. On my local XAMPP server it works fine and generate this output. Andy,Murray Sarah,Palin Bob,Saget However on this 000webhost.com free webhosting site I get the following…
tomaytotomato
  • 3,118
  • 13
  • 49
  • 103
1 2 3
22
23