Re: [PHP] CSV file with PHP

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 18:09:14 -0400, Dan Anderson <[EMAIL PROTECTED]> wrote: while ($line = mysql_fetch_array($result)) { if ($first) { foreach ($line as $key => $value) { if ($first) { fwrite($file_handle, $key); $first = FALSE; } else { fwrite($file_handle, ", $key"); } } fwrite ($file_handle

Re: [PHP] CSV file with PHP

2003-10-10 Thread Dan Anderson
You could do something like: $result = mysql_query($query) or die(mysql_error()); // don't display errors on production machines $first = TRUE; while ($line = mysql_fetch_array($result)) { if ($first) { foreach ($line as $key => $value) { if ($first) { fwrite($f

[PHP] CSV file with PHP

2003-10-10 Thread Cesar Aracena
Hi all, Does anybody knows how to make a CSV (comma separated values) file with PHP based on results fetched from MySQL? I need it to import it with Microsoft Outlook Express. Thanks in advanced, Cesar Aracena www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v