-1
View.php如何使用時,從選擇框中選擇值笨
這是笨的視圖文件來獲取表數據。
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>#</th>
<th>Year Range</th>
<select>
<?php foreach ($result as $value): ?>
<td></td>
<option><?php echo $value['year_key'] ?></option>
</select>
<th>Species</th>
<th>Data</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<?php foreach ($result as $value): ?>
<tr>
<td></td>
<?php foreach ($value['speces_key'] as $key => $value2): ?>
<td><?php echo $key; ?></td>
<td><?php echo $value2['data'] ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
我的問題:我點擊年份範圍從選擇框中框,然後選擇值,並根據使用笨選擇數值讀取表數據