I am passing an array from Javascript to PHP using AJAX and attempting to write the array as a new line in a CSV file. This row is being appended correctly but isn't including the necessary closing "," at the end.
$row = $_POST['row'];
$handle = fopen('filename.csv', 'a');
fputcsv($handle, $row);
fclose($handle);
I've tried messing with auto_detect_line_endings but to no success.