Forum Moderators: coopster

Message Too Old, No Replies

fgetcsv delimiter

can't find documentation for delimiter

         

bumpaw

3:06 pm on Nov 17, 2005 (gmt 0)

10+ Year Member



I have the manual on fgetcsv and it says that delimiter and enclosure are optional. I can't seem to find a list of possible values for these. For delimiter I have tab as "\t" and comma as "," which is default, but what about pipe?

enclosure defaults to "" but are there more?

uask

3:30 pm on Nov 17, 2005 (gmt 0)

10+ Year Member



bumpaw,

For a pipe delimiter, just try '¦' as the argument to follow the convention used for '\t' and ','.

As for enclosures, I'm not too sure.

coopster

10:15 pm on Nov 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, uask.

bumpaw, the delimiter can be whatever character you want to use as the column delimiter. Common values are tab and comma, as you mentioned. You know, like a comma-separated-value (.csv) format or better yet the tab-separated-value format.

enclosure can be whatever character you want as well, the double quotation mark is one of the more popular.

bumpaw

10:30 pm on Nov 17, 2005 (gmt 0)

10+ Year Member



Thanks All- I was looking for pipe to be "p" or something like that. Flexibility is a good thing!