<input name="name_for_the_items[]"/>
foreach($_POST['name_for_the_items'] as $item)
{
//do something with $item
}
이것은 내가 Question에서 얻은 코드입니다. 1 HTML input
에서 작동합니다. 루프를 통과해야하는 입력이 4 개 더 있습니다. 위에 주어진 것과 비슷한 코드로 어떻게 할 수 있습니까?
<input name="id[]"/>
<input name="time[]"/>
<input name="day[]"/>
<input name="room[]"/>
foreach($_POST['id'] as $item1) {
foreach($_POST['time'] as $item2) {
....
}
}
를 시도했지만 데이터의 세배 이상. 도와주세요.
더 정확하게 질문하십시오. "입력"을 정의하는 정확한 HTML 마크 업은 무엇입니까? – arkascha
@arkascha 질문을 업데이트하십시오. –