我創建了多個具有相同名稱的複選框,並且我需要知道在提交表單時如何獲取數組的值?我使用CakePHPCakePHP中具有相同名稱的多個複選框
<?php
e($form->create('Report', array('action' => 'add')));
for ($i = 0; $i < count($data); $i++) {
?>
<div class="left"><?php echo $data[$i]['ReportTitle']['title'] ?></div>
<div class="left" style="width:500px;"> </div>
<?php
for ($j = 0; $j < count($data[$i]['ReportStatement']); $j++) {
?><div class="left" style="width:50px; margin-left:50px; float:left;"><input type="checkbox" name="Report" value="<?php echo $data[$i]['ReportStatement'][$j]['id'] ?>" id="Report" /></div><div class="right" style=" width:600px; float:left;"><?php echo $data[$i]['ReportStatement'][$j]['statement'] ?></div>
<?php
}
}
?>