如何在 1 中合并表格?我的输出是这样的。我不能结合它太伤心了。有什么建议吗?
<table class="header-table" style="width:100%">
<tr>
<td><b>Drop</b> : {{$value['sequence_id']}}</td>
<td><b>Route Code</b> : {{$value['route_no']}}</td>
<td><b>Route Name</b> : {{$route_name}}</td>
</tr>
</table>
<?php
$getVsr = \App\Modules\Entities\VSR\VSR::where('route_no',$value['route_no'])->get();
// dd($getVsr);
?>
<table style="width:100%">
<tr>
<th> </th>
<th>ENV</th>
<th>VSR NO.</th>
<th>BOX/BDL</th>
<th>SEAL NO.</th>
<th>PADLOCK NO.</th>
<th>DEST-ATA</th>
<th>DEST-ATD</th>
<th>REMARKS</th>
<th>RECEIVED BY/DATE</th>
</tr>
@foreach($getVsr as $vsrVal)
<tr>
<td></td>
<td>{{$vsrVal['env']}}</td>
<td>{{$vsrVal['vsr_no']}}</td>
<td>{{$vsrVal['vsr_no']}}</td>
<td>{{$vsrVal['seal_no']}}</td>
<td>{{$vsrVal['padlock_no']}}</td>
<td>________</td>
<td>________</td>
<td>________</td>
<td>________</td>
</tr>
@endforeach
</table>
我的 table 不好。有什么想法吗?
最佳答案
添加另一个 tr 并在其中添加一个 colspan 为 3 的 td,然后您可以在此 td 中放置另一个表
<table class="header-table" style="width:100%">
<tr>
<td><b>Drop</b> : {{$value['sequence_id']}}</td>
<td><b>Route Code</b> : {{$value['route_no']}}</td>
<td><b>Route Name</b> : {{$route_name}}</td>
</tr>
<tr>
<td colspan="3">
<table>...</table>
</td>
</tr>
</table>
关于html - 如何将它合并到一张表中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56286710/