Fullstack Philosopher
Came across this gem half-way down the function page for fputcsv() on php.net Use an associative array for this so your keys will be the csv headers. Enjoy!