如何对表单元素进行分组
我得到了这个表格:
<form method="post" action="" accept-charset="utf-8">
<p>
<label>first_field</label><br />
<input type="text" id="first_field" name="points[]" /><br />
<input type="radio" value="inside" name="group_1" checked /><br />
<input type="radio" value="outside" name="group_1"><br />
</p>
<p>
<label>second_field</label><br />
<input type="text" id="second_field" name="points[]" /><br />
<input type="radio" value="inside" name="group_2" checked /><br />
<input type="radio" value="outside" name="group_2"><br />
</p>
</form>
我想完成的是检查内部还是外部,如果外部我检查了给定文本输入的乘以1,5。顺便说一句,这需要用PHP计算。
我该怎么做?
更新
Array
(
[bonus] => Array
(
[points] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
[10] => 0
[11] => 0
[12] => 0
[13] => 0
[14] => 0
)
[group] => Array
(
[0] => inside
[1] => outside
[2] => outside
[3] => inside
[4] => inside
[5] => inside
[6] => inside
[7] => inside
[8] => outside
[9] => inside
[10] => inside
[11] => inside
[12] => outside
[13] => inside
[14] => inside
)
)
)
以上为print_r结果($_POST)
现在,我将点数组与组数组进行比较/pare,因此:
点[0]被“连接到”组[0]等?