Home >Backend Development >PHP Tutorial >A simple way to export excel in php without using a plug-in_PHP tutorial
echo "{$n}t";
echo "{$t}t";
echo "{$k}t";
echo "{$s}t";
echo "{$r}t";
echo "{$a}tn";
foreach($a as $kk=>$pp){ //For each column of data
foreach($pp['child'] as $k=>$p){
echo iconv("utf-8", "gbk//IGNORE", $pp['u']."t");
echo iconv("utf-8", "gbk//IGNORE", $p['u']."t");
echo iconv("utf-8", "gbk//IGNORE", $p['s']."t");
echo iconv ("utf-8", "gbk//IGNORE", $p['t']."t");
echo iconv("utf-8", "gbk//IGNORE", $p[' c']."t");
echo iconv("utf-8", "gbk//IGNORE", $p['t']."tn");
}
}
The array format is