I am having problems trying to export to a csv/excel file, I am using a excel class from phpclasses and is working fine for the first row, the only thing is that I don't know how to create a loop in the array to populate data from the recordset.
here is the original code or example:
Code: Select all
$assoc = array(
array("Sales Person" => $name, "Q1" => "$3255", "Q2" => "$3167", "Q3" => 3245, "Q4" => 3943),
array("Sales Person" => "Jim Brown", "Q1" => "$2580", "Q2" => "$2677", "Q3" => 3225, "Q4" => 3410),Code: Select all
$assoc = array(
array("Sequence Number" => $row_grids['id'], "Program CardDate" => date('Ymd', strtotime($row_grids['etime'])), "Start Time" => date('H:m', strtotime($row_grids['etime'])), "End Time" => date('H:m', strtotime($row_grids['endtime'])), "Broadcast SerialNumber" => ($row_grids['id'] * 10), "Provider" => "Esperanza TV", "Program Alt Lang" => $row_grids['series'], "Program English" => $row_grids['series'], "AltLang SubTitle" => $row_grids['series'], "English SubTitle" => $row_grids['series'], "Program" => $row_grids['program'], "Episodes" => $row_grids['programuid'], "Channel" => "Esperanza TV", "Publish Point" => "/vod/".date('Ymd', strtotime($row_grids['etime']))."/n-".$row_grids['programuid']."-".date('Ymd', strtotime($row_grids['etime'])).".asf"),
);Thanks