これは機能しませんか?$_SESSION[]['id']=$row['id']; foreach ($_SESSION['id'] as $key=>$value){ echo $value; } 共有先: -----解決策--------- $row['id']='cs'; $_SESSION['id'][]=$row['id']; foreach ($_SESSION[id] as $value){ echo $value; } ?>ログイン後にコピー