How to convert Array to Array list for CSV export using FputCSV?

I need to convert an array with multiple results to a CSV file but am struggling to get a valid output . After some debugging I realized I am not generating a valid array list for fputcsv to iterate …

php fputcsv and enclosing fields

I was just about to ask the same questions as the question aksed here…. Forcing fputcsv to Use Enclosure For *all* Fields The question was When I use fputcsv to write out a line to an open …