Home  >  Article  >  Backend Development  >  请教一个php的表单post数组的问题,php页面接收不到数组的值

请教一个php的表单post数组的问题,php页面接收不到数组的值

WBOY
WBOYOriginal
2016-06-23 13:56:481467browse

ecshop 二次开发
请教一个php的表单post数组的问题flow.dwt模板页面




flow.php接收页
$lis_address=$_POST['addinputarr'];
$result = count($lis_address);
echo "<script>alert('".$lis_address."');</script>";
echo "<script>alert('".$result."');</script>";
foreach($lis_address AS $key=>$v)
{
echo "<script>alert('".$v."');</script>";
}

输出结果:输出结果是 1,Array, foreach没有输出


回复讨论(解决方案)

输出结果顺序弄错了是:输出结果是 
Array
1
 foreach没有输出

var_dump($lis_address);看看什么结果

echo $_POST['addinputarr'];
看看里边是什么东西 。是不是你想要的传递3个值的数组

var_dump($lis_address); 谢谢

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