Passing arrays from HTML form to PHP

前端 未结 3 1581
旧时难觅i
旧时难觅i 2021-01-25 18:00

This is the HTML:

 do 
<
3条回答
  •  情话喂你
    2021-01-25 18:39

    You can specify shortcut value as the key and the ses value as the value attribute:

    
    
    
    

    On the server-side you could use a foreach loop to iterate over the array:

    foreach ($_POST['input'] as $shortcut => $ses) {
        // process $shortcut and $ses
    }
    

提交回复
热议问题