21,886
社区成员
发帖
与我相关
我的任务
分享
...
$strkeys= "'tagname'=>,'descr'=>,'unit'=>,";
for($w= 1; $w<= $days; $w++)
{
$strkeys= $strkeys."'".$w."日'=>,";
}
$strkeys= $strkeys."'Total'=>";
$excelres[]= array($strkeys);
//print_r($excelres);
$strkeys= array('tagname'=>'','descr'=>'','unit'=>'');
$days = 31;
for($w= 1; $w<= $days; $w++)
{
$strkeys[$w.'日'] = '';
}
$strkeys['Total'] = '';
$excelres[]= $strkeys;
print_r($excelres);
Array
(
[0] => Array
(
[tagname] =>
[descr] =>
[unit] =>
[1日] =>
[2日] =>
[3日] =>
[4日] =>
[5日] =>
[6日] =>
[7日] =>
[8日] =>
[9日] =>
[10日] =>
[11日] =>
[12日] =>
[13日] =>
[14日] =>
[15日] =>
[16日] =>
[17日] =>
[18日] =>
[19日] =>
[20日] =>
[21日] =>
[22日] =>
[23日] =>
[24日] =>
[25日] =>
[26日] =>
[27日] =>
[28日] =>
[29日] =>
[30日] =>
[31日] =>
[Total] =>
)
)
$strkeys= ['tagname'=>'',
'descr'=>'','unit'=>''
];
$days=30;
for($w= 1; $w<= $days; $w++)
{
$strkeys[$w.'日']='';
}
$strkeys['Total']='';
print_r($strkeys);