Write CSV To File Without Enclosures In PHP Write CSV To File Without Enclosures In PHP php php

Write CSV To File Without Enclosures In PHP


The warnings about foregoing enclosures are valid, but you've said they don't apply to your use-case.

I'm wondering why you can't just use something like this?

<?php$fields = array(    "field 1","field 2","field3hasNoSpaces");fputs(STDOUT, implode(',', $fields)."\n");


works with chr() function:

fputcsv($f,$array,',',chr(0));


fputcsv($file, $data, ';', chr(127));