Menu
[code=php]$list = array (“$logtime”, “$vname”, “$addr”, “$addr2”, “$city”, “$state”, “$zip”, “$vemail”, “$vphone”, “$ip”);
$datafile= “_datalog.csv”;
$fp = fopen($datafile, “a”);
foreach ($list as $line)
{
fputcsv($fp, split(‘,’, $line));
}
fclose($fp);
I have this code basically copied from php.net, but when I execute it the resulting csv file has no commas in it. Where commas should be are line feeds (0a). Where am I going wrong?