I'm been hunting everywhere trying to find how to access data returned via a Zend db call. i want to append each columns value, comma delimited into a variable. I've always used associative calls in the past $row['fieldname'] etc.. but don't want to type out all the fields. I think I'm pretty close with the below but it's not working. Can someone point out my error? Thanks!
$data = $db->fetchAll($query);
$i=13; //number of columns
foreach($data as $row){
for($j=0;$j<$i;$j++) {
$csv_output .= $row[$j].", ";
}
$csv_output .= "
";
}