|
Posted by Geoff Berrow on 03/13/06 02:23
Message-ID: <a7k81294tbp938j1cj7oi6ng978q02476l@4ax.com> from Geoff
Berrow contained the following:
>header("Content-Type: text/csv");
>header("Content-Disposition: inline; filename=$_SESSION[table].csv ");
OK, I'm exporting CSV files nicely now but I wondered how other people
tackle the problem of the content containing quotes.
I'm exporting the data like this
"some data", "some more data", "yet more data"
Eventually the file will be imported into Access.
It occurred to me that if the data contained a double quote mark, then
the file could be messed up.
I've done a string replace and changed double quotes to single, but this
doesn't feel like a very elegant or satisfactory solution so I wondered
what other people do?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|