PHP怎样在网页间传递数组?? 用get方式传递?这样当然不行啦。必须要post才能直接传数组。input的name要类似 name="aa[0]" name="aa[1]"用连接传递要把数组拆开,放到连接里check.php?arg1=a&arg2=b&arg3=c 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把数组变成字符串就可以用GET方式传递,在接受页,再重新组合成数组,也可以不重新组合具体看你怎么用 表单传递试试<?php for($count=0;$count <4$count++) { echo " <tr> <td> <input type=\"text\" name=\"{arr[$itemamountsent[$count]]}" size=\"10\" value=\"$itemamount[$count]\" "; //echo " <tr> <td> <input type=\"text\" name=\"{arr[".$itemamountsent[$count]."]}\" size=\"10\" value=\"$itemamount[$count]\" "; echo " </td> "; echo " </tr> "; } 第二张网页上是这样! <?php print_r($_POST[arr]); ?> 为什么第二张上打印不出来?? 第一张网页上如果没有提交的话数组就根本没有付值嘛传递字符串可以参考.net 的样子,base64_encode(serialize($arr)) php初学者 添加图片 apache 崩溃 请问php-memcache怎么通过UDP连接memcached 死活无法加载php5apache2_2.dll模块,apache死活启动不了的进来看看 连接不上远程数据库,总是自动连接本机. 求助:需求分析报告的写法? php exit输出常量小问题 echo怎么输出>"符号? 技术问题求教:php中如何得到客户端机器的物理地址,不是IP?全部分数赠送! 关于php页面执行时间问题。 关于深藍UTF-8正體簡體轉換函數 1.0 的使用问题 PHP 提交次数控制问题 非避免重复提交
具体看你怎么用
表单传递
试试
<?php for($count=0;$count <4$count++)
{
echo " <tr> <td> <input type=\"text\" name=\"{arr[$itemamountsent[$count]]}" size=\"10\" value=\"$itemamount[$count]\" ";
//echo " <tr> <td> <input type=\"text\" name=\"{arr[".$itemamountsent[$count]."]}\" size=\"10\" value=\"$itemamount[$count]\" "; echo " </td> ";
echo " </tr> ";
}
第二张网页上是这样!
<?php
print_r($_POST[arr]); ?>
为什么第二张上打印不出来??
传递字符串可以参考.net 的样子,base64_encode(serialize($arr))