我想在$ _POST []内爆数组。我在一个循环内搜索〜31个数组中的值... $ _ POST ['1'],$ _POST ['2'],$ _POST ['3']等。
I我试图用做到这一点:
while($i <= $_SESSION['daysInMonth']){
$month = $_SESSION['month'];
$day = $i;
$names = implode(',',$_POST['names_'.$i]);
$region = $_SESSION['region'];
$date = date("Y").'-'.$month.'-'.$day;
echo("$names");
$i++;
}
我收到以下错误,但:
警告:破灭()[function.implode]:传入的参数无效的/ home /内容/ r/e/s/reslife4/html/duty/schedule.php on line 15
这是我如何创建$ _ POST []变量:
<?php $i=1; while($i <= $daysInMonth){?>
<table align="center" style="width: 435px">
<tr>
<td class="style1"><p><select name="names_<?php echo($i); ?>[]" multiple="multiple">
<?php foreach($email_array as $arr){ ?>
<option><?php echo($arr); ?></option>
<?php } ?>
</select></p></td>
</tr>
</table>
<?php $i++; }?>
有人能看到我在做什么错?
谢谢!