$_SESSION[]['id']=$row['id'];
foreach ($_SESSION['id'] as $key=>$value){
echo $value;
}
------解决方案--------------------
<?php
$row['id']='cs';
$_SESSION['id'][]=$row['id'];
foreach ($_SESSION[id] as $value){
echo $value;
}
?>
<?php
$row['id']='cs';
$_SESSION['id'][]=$row['id'];
foreach ($_SESSION[id] as $value){
echo $value;
}
?>