$ret = '';<BR>$arrs = array(array(1,'test1'),<BR> array(2,'test2'),<BR> array(3,'test3'),<BR> array(4,'test4'),<BR> array(5,'test5'),<BR> array(6,'test6'),<BR> array(7,'test7')<BR> );<BR>foreach($arrs as $k=>$arr){<BR> $ret .= $arr[0].",".$arr[1]." \n";<BR>}<BR>//$ret<p>5本文来源gao!daima.com搞$代!码#网#</p><pre>搞代gaodaima码
= @mb_convert_encoding ($ret, ‘GBK’,’UTF-8′);
header(“Content-Disposition: attachment; filename=xxxx.csv”);
header(“Content-Type:APPLICATION/OCTET-STREAM”);
echo $ret;