如果我将其作为一个三维数组:
(int) Year 1 => array(
'Department 1' => array(
'Sales' => '12345',
'Revenue' => '12345',
'total' => '12345'
),
'Department 2' => array(
'Sales' => '12345',
'Revenue' => '12345',
'total' => '12345'
),
),
(int) Year 2 => array(
'Department 1' => array(
'Sales' => '12345',
'Revenue' => '12345',
'total' => '12345'
),
'Department 2' => array(
'Sales' => '12345',
'Revenue' => '12345',
'total' => '12345'
),
)
我将如何在 HTML 表格中显示它。以年为标题。各行开头左侧的部门。以及年列中单独列中的销售额、修订和总计。
输出应该看起来像
Department_______YEAR1_________Year2
Department 1 |Sales,Reveue |Sales,Reveue
Department 2 |Sales,Reveue |Sales,Reveue