我有一个多维php数组,它输入到HTML表中。我想要做的是当我选中与表行关联的复选框并点击提交时,元素将从表中删除,以及需要从多维PHP数组中删除元素。
array(
array(name => Test, email => test@gmail.com),
array(name => Test2, email => test2@gmail.com)
);
<table>
<thead>
<tr>
<th>Delete</th><th>Tech Name</th><th>Tech Email</th>
</tr>
</thead>
<tbody>
<?php foreach($current_option_array as $key => $item):?>
<tr>
<td><input name="DelBox-Tech" type="checkbox"> </td>
<td><?php print_r($item[Name]); ?></td>
<td><?php print_r($item[Email]);?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>