Andre, et al -- [Sorry for the delay...]
...and then Andre Speelmans said...
%
% Hi David,
Hi!
%
% On Fri, Jan 09, 2004 at 11:04:21AM -0500, David T-G wrote:
% >
% > header ("Content-Type: application/csv;") ; # this is a CSV
% > header ("Content-disposition: attachment; filename=authorized-visitors.$d.csv")
; # file name
% > ...
% > [suck in file and dump into $a array]
% > foreach ( array_keys($a) as $ak ) # walk thru the array
% > { print "\"$a[$ak]\"," ; } # print the field
(yes, even if blank)
%
% But this would go wrong if $a[$ak] contained a double quote. Remember you have
Oooh; good point. My input is all sanitized, so " becoamse " and so
on, but for raw data that would definitely be a factor.
% to escape those characters. Can't the database of OP do a dump, like MySQL
% can?
Well, in my case each record is a file on disk, so that doesn't apply.
Thanks & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature
