How to provide a string delimeter in fgetcsv()

19 Views Asked by At

Since my file columns are separated by a tab, I use the following:

while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {

But is there a way to deal with a string delimiter as well?

enter image description here

1

There are 1 best solutions below

0
e1st0rm On BEST ANSWER

Add more one optional parameter:

$data = fgetcsv($handle, 1000, "\t", "\"");

Here more information about fgetcsv