gpt4 book ai didi

php - HTML/PHP 计时表时髦的布局

转载 作者:太空宇宙 更新时间:2023-11-04 01:42:17 27 4
gpt4 key购买 nike

我想为公司动态创建一个开盘和收盘时间表,但布局看起来很糟糕,因为每行之间的间隙太大,这是它的屏幕截图:Screenshot

谁能帮我弄清楚为什么会这样,或者我应该把 php 代码放在哪里才能使它正确。提前致谢

    <div class="container about-timings wow fadeInUp">
<div class="row">
<div class="col-md-12">
<?php

include("admin/db/db.php");



$select_db = "select * from timings";

$run_events = mysql_query($select_db);

while($row=mysql_fetch_array($run_events)){


$id = $row['id'];
$day = $row['day'];
$open = $row['open'];
$close = $row['close'];


?>
<table class="table table-bordered">



<td><?php echo $day; ?></td>
<td><?php echo $open; ?></td>
<td><?php echo $close; ?></td>

<?php }?>

</table>
</div>
</div>
</div>
</section>

最佳答案

 <table class="table table-bordered">
<?php
while($row=mysql_fetch_array($run_events)){
$id = $row['id'];
$day = $row['day'];
$open = $row['open'];
$close = $row['close'];
echo' <tr>
<td>'. $day .'</td>
<td>'. $open.'</td>
<td>'.$close.'</td>
</tr>';
}?>
</table>

关于php - HTML/PHP 计时表时髦的布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45196288/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com