$_POST[]に配列を内破しようとしています。これは、〜31配列の値を検索するループ内で実行しています... $ _ POST ['1']、$ _ POST ['2']、$ _POST['3']など。
私はこれを次のようにしようとしています:
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++;
}
ただし、次のエラーが発生します。
警告:implode()[function.implode]:15行目の/home/content/r/e/s/reslife4/html/duty/schedule.phpで無効な引数が渡されました
これが$_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++; }?>
誰かが私が間違っていることを見ることができますか?
ありがとう!