Jurgen
Jurgen

Reputation: 274

How to provide a string delimeter in fgetcsv()

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

Upvotes: 1

Views: 17

Answers (1)

e1st0rm
e1st0rm

Reputation: 115

Add more one optional parameter:

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

Here more information about fgetcsv

Upvotes: 1

Related Questions