我创建了一个php
带有mysql
后端的页面,以显示包含员工姓名、月份、订单的小表的结果,如下所示:
<table border="1" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Month</th>
<th scope="col">Cases</th>
</tr>
</thead>
<?php do { ?>
<tbody>
<tr>
<td><?php echo $row_rsChart2['ContactFullName']; ?></td>
<td><?php echo $row_rsChart2['Month']; ?></td>
<td><?php echo $row_rsChart2['Cases']; ?></td>
</tr>
</tbody>
<?php } while ($row_rsChart2 = mysql_fetch_assoc($rsChart2)); ?>
</table>
是否可以将月份列用作标题,在列标题中从左到右显示 Jan、Feb、March 等,并将每个月的案例作为数据?
1 月 - 2 月 - 3 月 用户 1 100 47 89 用户 2 86 67 134
使用默认布局,它显示为:
姓名 - 月份 - 案例 User1 100 年 1 月 用户 1 2 月 47 日 用户 2 1 月 67 日