Php html表使用for循环和第一列静态?
我想填充第一个字段为静态的表,其他字段来自使用for循环的数据库 空白列来自使用for循环的数据库,我必须静态地插入第一列,我该怎么做Php html表使用for循环和第一列静态?,php,html,Php,Html,我想填充第一个字段为静态的表,其他字段来自使用for循环的数据库 空白列来自使用for循环的数据库,我必须静态地插入第一列,我该怎么做 for($i=0;$i<5;$i++){ <td></td> <td></td> <td></td> <td></td> } 我建议您阅读更多关于如何创建表及其行的内容() 但是要小心,因为数组中的项数必须与条
for($i=0;$i<5;$i++){
<td></td>
<td></td>
<td></td>
<td></td>
}
我建议您阅读更多关于如何创建表及其行的内容()
但是要小心,因为数组中的项数必须与条件下的
相同 我必须创建一个表,手动插入第一列,其他列来自数据请提供查询结果中的示例数据需要提供更多信息
story blank blank blank
games blank blank blank
number blank blank blank
<?php for($i = 0; $i < 5; $i++):?>
<tr>
<td>my static value</td>
<td></td>
<td></td>
<td></td>
</tr>
<?php endfor;?>
<?php
$myArrayWithMyStaticValues = ['item1', 'item2', 'item3', 'item4', 'item5'];
for($i = 0; $i < 5; $i++):?>
<tr>
<td><?=$myArrayWithMyStaticValues[$i];?></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<?php endfor;?>