Ваш формат массива неверный:
<?php
function qa($q, $a){
$o = new StdClass; $o->question = $q; $o->answer = $a;
return $o;
}
$yourArrayLooksLike = [
['2020-04-16 13:18:05', qa('What is your name?', 'khushwinder'), qa('What is your age?', '130'), qa('Please tell me your birth year?', '01-05-1986'),
qa('Are you married?', 'yes'), qa('How many children do you have', '1')],
['2020-04-16 13:35:34', qa('Hi my name is Matt and im here to help...', 'gi'), qa('What is your age?', 'happy'),
qa('Please tell me your birth year?', '09-02-1983')],
['2020-04-17 08:54:20', qa('What is your name?', 'jack'), qa('What is your age?', '30'), qa('Please tell me your birth year?', '01-01-98'),
qa('Are you married?', 'yes'), qa('How many children do you have', '2'), qa('Do you like tea ?', 'yes'),
qa('Please tell me something about yourself?', 'nothing')]
];
// print_r($yourArrayLooksLike);
function fixFormat($badFormat){
$fix = [];
foreach($badFormat as $a){
$d = $a[0]; $n = array_slice($a, 1);
foreach($n as $o){
$r = [$d];
foreach($o as $v){
$r[] = $v;
}
$fix[] = $r;
}
}
return $fix;
}
$arrayShouldBe = fixFormat($yourArrayLooksLike);
// print_r($arrayShouldBe);
$file = 'yourCSV.csv'; $fp = fopen($file, 'w');
foreach($arrayShouldBe as $a){
fputcsv($fp, $a);
}
fclose($fp);
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: '.filesize($file));
readfile($file); die;
?>