qwerty234 Posted April 4, 2007 Share Posted April 4, 2007 Ignoring the print_r below (which is telling me that there is data in $result), can someone tell me why my iteration is not outputing the data from $result? $excel_row = 6; $excel_col = 0; print_r($result); $colnames = array_keys ($result[0]); foreach ($result as $row) { foreach ($colnames as $colName) { $sheet->write($excel_row,$excel_col,$row[$colName],$colHeadingFormat); $excel_col++; } $excel_row++; } Link to comment https://forums.phpfreaks.com/topic/45622-simple-iteration-question/ Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 Can we see what print_r($result) shows you? Link to comment https://forums.phpfreaks.com/topic/45622-simple-iteration-question/#findComment-221614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.