Hello,
"Justin French" <[EMAIL PROTECTED]> wrote:
[snip]
> Sample line from your CSV should look like this:
>
> ---
> "1","foo","harry said \"what is it?\"","foo"
> "1","bah","\"don't know\" said sally","something"
> ---
>
> When echoing these values to the browser, you would strip the slashes.
I did email the company that the csv feed is coming from so we'll see what
comes of that. I really hope they fix it.
Well here is what I did to solve the problem:
I pulled the csv file in using file(), then found the string length, used
substr() to get rid of the first double quote in the line a
How is the CSV being generated? Seems to me like your problem isn't
ggetcsv(), but rather the file itself.
Commonly, a CSV file is a series of values, separated by a comma (duh!!).
The separated values are generally enclosed in double quotes ("), as it
would appear yours are.
Any double quotes
Richard,
> I am parsing a csv file with fgetcsv and the fields are surrounding by
> double quotes, now I am running into a problem periodically that when
there
> are quotes within the value it is treating it like another value instead
of
> the same value.
> Any ideas on how to get around that?
>
>
4 matches
Mail list logo