<input type="hidden" name="msginfo[name][]" value="张三"/> <input type="hidden" name="msginfo[phonenum][]" value="111111111"/> <input type="hidden" name="msginfo[name][]" value="李四"/> <input type="hidden" name="msginfo[phonenum][]" value="222222222"/>
<?php $msgInfos = $_POST['msginfo']; $phoneNums = $msgInfos['name']; // 为array(-=>张三,1=>李四) $phoneNums = $msgInfos['phonenum']; // 为array(0=>111111111,1=>222222222)
<?php
if(isset($_POST['submit'])){
$users = $_POST['user'];
foreach($users as $key=>$val){
echo 'user ',$key,' = ',$val,'<br />';
}
}
?>
<form method="post">
zhangsan <input type="text" name="user[zhangsan]" value="0" /><br />
lisi <input type="text" name="user[lisi]" value="1" /><br />
wangwu <input type="text" name="user[wangwu]" value="2" /><br />
zhaoliu <input type="text" name="user[zhaoliu]" value="3" /><br />
<input type="submit" name="submit" value="提交" />
</form>
<form method="post">
<?
for($i=0;$i<10;$i++){
?>
<input type="checkbox" name="interests[]" value="<?=$i?>">test<?=$i?><br>
<?
}
?>
<input type="submit">
</form>
<?php
<code class="php keyword">if(isset($_POST)){
foreach($_POST as $key => $val){
if(is_array($val)){
foreach($val as $v2){
echo "$v2<br>";
}
}
}
}
?>
</code>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有