Write CSV To File Without Enclosures In PHP

前端 未结 14 814
谎友^
谎友^ 2020-12-01 07:11

Is there a native function or solid class/library for writing an array as a line in a CSV file without enclosures? fputcsv will default to \" if no

14条回答
  •  旧巷少年郎
    2020-12-01 07:46

    Well car(0) didn't work out as the NULL value will most likely choke most csv parsers.

    I ended using fputcsv() to build the initial file, then went through and removed all quotes. Elegant? Maybe not, but it got the job done :).

提交回复
热议问题