The easiest way is to flip the arrays from columns to rows.
Assuming that all the arrays have the same number of elements, this should do the job:
$rows = array();
// Converts the arrays of columns into arrays of rows
$length = count($first_array);
for ($i = 0; $i < $length; $i++) {
$rows[$i] = array($first_array[$i], $second_array[$i], $third_array[$i]);
}
// Writes the rows to the file
$fp = fopen('outfile.csv', 'w');
foreach ($rows as $row) {
fputcsv($fp, $row);
}
fclose($fp);