You aren't passing [man]fputcsv/man an array. There is no need for a foreach() loop - just pass the array directly to the function and it will handle writing out each individual field on its own. (After all, that's the whole point of using that function.. if it couldn't handle the entire array, you might as well just be using fwrite() instead!)
Also, all of this:
$myFile = "HAL.002";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
$ReplaceThese = array("\'","\"","\"");
$buffer = str_replace($ReplaceThese, '', $theData);
$myFile = "HAL.002";
$fh = fopen($myFile, 'w+');
$writeData_d = $buffer;
fwrite($fh, $writeData_d);
fclose($fh);
is (at best) unnecessary. If you want [man]fputcsv/man to format the data in a certain way, then do so by specifying the arguments that the function expects. Don't try to take the default options and then later mangle the data on your own.
(However, I suspect the data will be more to what you're expecting once you start using fputcsv() correctly.)