issue: I have an associative array, where all the keys represent the csv headers and the values in each $key => array.. represent the items in that column.
Research: To my knowledge, fputcsv likes to go in row by row, but this column-based array is making that complicated. I have not found any function out there that accomplishes this.
Example:
Array(
['fruits'] => Array(
[0] => 'apples',
[1] => 'oranges',
[2] => 'bananas'
),
['meats'] => Array(
[0] => 'porkchop',
[1] => 'chicken',
[2] => 'salami',
[3] => 'rabbit'
),
)
Needs to become:
fruits,meats
apples,porkchop
oranges,chicken
bananas,salami
,rabbit
Why it's hard:
You need to know the max number of rows to make blank spots.