Home >Backend Development >PHP Tutorial >php获取$_POST同名参数数组的实现介绍_PHP

php获取$_POST同名参数数组的实现介绍_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 12:05:24891browse

今天写php的时候发现$_POST["arr"]无法获取参数arr的数组,记录一下。
例如有以下表单需要提交:
复制代码 代码如下:
  
  
  
  

 使用$_POST["arr"]只能获得最后选择的复选框的值,要获得全部选中的复选框的值需要把表单修改成下面:
复制代码 代码如下:
  
  
  
  

这样就可以使用$_POST["arr"]获得全部选中的checkbox的值了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn