Forum Moderators: coopster
$list = array
(
"$company,$fname $lname,$fname,$title,$email,$address1,$address2,$city,$state,$zip,$phone,$fax",
);
$file = fopen("contacts.csv","w");
foreach ($list as $line)
{
fputcsv($file,split(',',$line));
}
fclose($file);
Any help would be so greatly appreciated.
The second (one the array itself) - I end up with everyting in one column with '/' escape characters - no quotes.
I've even tried doing the '"$name"' around each variable but it still puts 3 quotes in the csv (if you view in notepad) (e.g. """John""").
And the only thing that works with the quotes is when there's a space in the form field (e.g. "123 street").
Totally stumped here...
I know the default for the enclosure is the double quote - any other suggestions?