Assuming you have a $Data
array, which contains individual arrays for each registry (or line), you may try this:
$Delimiter = '"';
$Separator = ','
foreach($Data as $Line)
{
fwrite($File, $Delimiter.
implode($Delimiter.$Separator.$Delimiter, $Line).$Delimiter."\n");
}
Where $File
is the handle for your file. Put in $Delimiter
, the character you want to put around each field, and in $Separator
, the character to use between fields.