while{} から値が挿入される連想配列があります。
//some sql select
$comar=array();
while($row=mysql_fetch_array($result)){
//another sql countrow
$rowdd=mysql_fetch_row($result);
$postuid=$row[2];
$comar[$postuid]= $rowdd[count(idnum)];
$_SESSION['comar']=$comar;
}
しかし、このコードは最後の postuid の idnum を表示するだけです。すべてを 1 つの変数に追加して、それをセッションに入れるにはどうすればよいですか。