Simple Example:
$a = array(1,2,3,4);
$b = array(10,20,30,40);
$c = array(100,200,300,400);
If I execute the following:
$fp = fopen('somefile.csv','w');
fputcsv($fp,$a);
fputcsv($fp,$b);
fputcsv($fp,$c);
fclose($fp);
I get a file that looks like this:
1,2,3,4
10,20,30,40
100,200,300,400
As I would expect. However what I want is:
1,10,100
2,20,200
3,30,300
4,40,400
Is this possible without just looping and writing each index from each array?