&_POST['t']得到的是一个数组,既然这个能够得到两个值,所以在显示的时候,我想应该是用一个循环来显示所有的值吧,你试试看
解决方案 »
- phpmailer:Could not instantiate mail function
- php 5.2.17 里为什么没有 php_domxml.dll 这个扩展?谁有分享一个吧,快搞死了。。。。。。。。。。。。。。。。。
- apache与php自定义整合安装?
- fputcsv 如何强制所有的数据都加双引号
- 这个功能怎么实现?
- 关于item_no增加问题,万分火急!
- PHP 5.5.3/5.4.19 紧急发布
- 很急的问题.在线等.......
- *****请问用代码循环生成一组文本框,怎么在提交时取到其值
- 传递变量的问题!很奇怪!不是全都获得不到值!
- 图片版块翻页效果。。。
- php +mssql 有没有 像mysql_insert_id功能 函数
<form action="testcheck.php" method="POST" >
<input type="checkbox" name="test[]" value="1">1
<input type="checkbox" name="test[]" value="2">2
<input type="submit" value="OK">
</form>
<?php
$end=$_POST['test[]'];
for($i=0;$i<count($end);$i++){
echo $end[$i];
}
?>
像上面那样吗?好像还是不行.请问一下要怎么修改才行
<input type="checkbox" name="test[]" value="1">1
<input type="checkbox" name="test[]" value="2">2
<input type="submit" value="OK">
</form>
<?php
$end=$_POST['test'];
for($i=0;$i<count($end);$i++){
echo $end[$i];
}
?>