I was wondering if it is possible to get headers above the customer loop? If it is possible then it is possible to download and import the file direct into sage.
I was wondering where i would have to place the headings:
Do I have to tweak it a little bit around: ???
//print_r($customers); //Test print array
tep_db_free_result($new_customers_result); //Housekeeping
//End do the queries
$cust_count = count($customers);
if (!empty($customers)) { //If no new customers have signed up since the last update then skip writing a CSV
for ($i=0; $i < $cust_count; $i++) { //Loop through all customers that have purchased
$handle = fopen(DIR_FS_ADMIN . 'sage_csv/customers_' . $filename . $date_updated . '.CSV', 'a');
fwrite($handle,
$customers[$i]['customers_id'] . ","
$customers[$i]['customers_city'] . "," .
$customers[$i]['customers_state'] . "," .