form表单里面如果有两个相同的name,传过去得到的name值只有一个,我就想要得到两个值怎么办,求助
phpcn_u806
phpcn_u806 2017-03-21 17:26:58
0
2
1326

form表单里面如果有两个相同的name,传过去得到的name值只有一个,我就想要得到两个值怎么办,求助

phpcn_u806
phpcn_u806

reply all(2)
数据分析师

If there are two identical names in the form, and there is only one name value passed in, what should I do if I want to get two values? Help - PHP Chinese Q&A - If there are two identical names in the form name, there is only one name value after passing it. I want to get two values. What should I do? Please help - PHP Chinese website Q&A

Take a look and learn.

阿神
<input name="name[]" value="1"/>
<input name="name[]" value="2"/>

query stringify后效果是

name%5B%5D=1&name%5B%5D=2

query parse之后在Js中是一个Array, 在PHP中是一个Indexed Array, 在Python中是一个list.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template