我有一些代码在表格中显示结果
现在它将每行显示 3 个单元格。问题是第一行显示 2 然后创建一个具有预期行为的新行。如何让第一行显示 3 个单元格
if(++$cnt == 0) {
echo '<tr>';
} elseif($cnt % 3 == 0) {
echo '</tr><tr>';
}
echo "<td bgcolor='#009933'><a href='" . $row['local_link'] . ".m4v' name='video'>" . $row['local_link'] . "</a></td>";
echo "<td><video width='320' height='240' controls='controls'>
<source src='" . $row['local_link'] . ".m4v" . "' type='video/mp4' />
Your browser does not support the video tag.
</video></td>";
}
}
echo "</table>";