Hi.
I'm wondering if there is a way to limit a certain chunk of
text to be put into the csv file (as shown below), like a way to
end the header.
The reason I ask is because I do get my csv files alright,
but there is a whole chunk of html that gets put into the file as well.
Thanks in advance
function export(&$arrdat a,&$linkname='t est',&$filename ='test') {
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=data.c sv');
//echo $arrdata[0]["evaluatee"]["group_avg"][0];
//echo $arrdata[0]["numOfMembe rs"];
for($i=0;$i<$ar rdata[0]["numOfMembe rs"];$i++){
echo $arrdata[0]['evaluatee'][$i]['last_name'] . "," .
$arrdata[0]['evaluatee'][$i]['last_name'] . "," .
$arrdata[0]['evaluatee'][$i]["average_gr ade"]. "\r";
}
I'm wondering if there is a way to limit a certain chunk of
text to be put into the csv file (as shown below), like a way to
end the header.
The reason I ask is because I do get my csv files alright,
but there is a whole chunk of html that gets put into the file as well.
Thanks in advance
function export(&$arrdat a,&$linkname='t est',&$filename ='test') {
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=data.c sv');
//echo $arrdata[0]["evaluatee"]["group_avg"][0];
//echo $arrdata[0]["numOfMembe rs"];
for($i=0;$i<$ar rdata[0]["numOfMembe rs"];$i++){
echo $arrdata[0]['evaluatee'][$i]['last_name'] . "," .
$arrdata[0]['evaluatee'][$i]['last_name'] . "," .
$arrdata[0]['evaluatee'][$i]["average_gr ade"]. "\r";
}
Comment