这样不行么
$_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;
}
?>