对于“提交”输入项:
name="remove['.$username.']['.$event_id.']"
if (isset($_POST[remove])) {
foreach ($_POST[remove] as $username => $event_obj) {
foreach ($event_obj as $event_id => $obj) {
delete .... WHERE event_id='$event_id' AND username='$username'");
}
}
}
是否有更短的方法来获取在具有一个项目的数组中使用的关联键?