我正在尝试创建一个交互式任务板,参与者可以如图所示互相提问:
下面是我的视图的外观。这将生成表格设计,如上图所示。但是我如何扩展表功能,以便每个tr-> td绑定/对应于特定的thead-> tr-> th?
<table class="table" id="projTable">
<thead>
<tr>
<th></th>
<?php
foreach ($Participants as $Participant) {
echo '<th> '.$Participant['username'].' </th>';
}
?>
</tr>
</thead>
<tbody>
<?php
$counttoken = count($Participants);
foreach ($Participants as $Participant) {
echo '<tr>';
echo '<td> '.$Participant['username'].' </td>';
for($i=0; $i<$counttoken; $i++) {
echo '<td> </td>';
}
}
echo '</tr>';
?>
</tbody>
</table>