AH HA! Got it!
The problem was I did not need to loop through the array headers to
associate the data. So I removed:
foreach($field_name as $fieldName) { // Loop through the array of headers
as we fetch the data
$row[] = parseCSVComments($info->$fieldName);
} // End loop
And ran it as:
while($info = ifx_fetch_row($query)) {
//print_r($info);
$data .= join(',', $row)."\n"; // Create a new row of data and append it
to the last row
$row = ''; // Clear the contents of the $row variable to start a new row
}
And everything output correctly!
Dan