- Output for 7.1.0 - 7.1.19, 7.2.0 - 7.2.8
- Fatal error: Cannot use [] for reading in /in/QRqRo on line 3
Process exited with code 255.
<?php
$fields = array(
'menu_id' => $menu_id[],
'menu_name' => $menu_name[],
'yes' => $yes[]
);
?>
<form action="<?php base_url('controller/insert'); ?>">
<table>
<thead>
<tr>
<th>Menu Id</th>
<th>Menu Name</th>
<th>Yes/No</th>
</tr>
</thead>
<tbody>
<?php foreach($result as $res) { ?>
<tr>
<td><input type="text" name="menu_id[]" value="<?= $res->menu_id ?>"></td>
<td><input type="text" name="menu_name[]" value="<?= $res->menu_name ?>"></td>
<td><input type="checkbox" name="yes[]" value="<?= $res->menu_id ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>