[nycphp-talk] fgetcsv alternatives?
Fan, Wellington
wfan at VillageVoice.com
Tue Aug 23 14:21:02 EDT 2005
Because CSV is more complex than that -- delimiter characters that are
actually data, the escaping of text qualifier characters, etc.
> -----Original Message-----
> From: Allen Shaw [mailto:ashaw at iifwp.org]
> Sent: Tuesday, August 23, 2005 2:12 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] fgetcsv alternatives?
>
>
> Fan, Wellington wrote:
>
> >I have a large buffer that I'd like to parse as CSV -- so is there a
> >function similar to fgetcsv() that could operate on a string
> buffer rather
> >than a filehandle?
> >
> Why not explode()?
>
> <?
> $lines = explode("\n", $buffer);
> foreach ($lines as $line) {
> $fields = explode("\t", $line);
> }
> ?>
>
> --
> Allen Shaw
> Polymer (http://polymerdb.org)
>
> Fine-grained control over how your users access your data:
> user permissions, reports, forms, ad-hoc queries -- all
> centrally managed.
>
>
>
>
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
More information about the talk
mailing list