tqla Posted October 22, 2009 Share Posted October 22, 2009 Hello, When I print the SESSION I see this: Array ( [program32] => Array ( [userId] => 2 ) ) The userid is indeed 2 and I need to use it. Can someone tell me how to isolate the userid and echo it? I've tried a few things but failed. Thanks. Quote Link to comment Share on other sites More sharing options...
btherl Posted October 22, 2009 Share Posted October 22, 2009 Try this: echo $_SESSION['program32']['userId'] . " should have the value 2\n"; If you have multiple array elements then you can use foreach to go through each one in turn. Quote Link to comment Share on other sites More sharing options...
tqla Posted October 22, 2009 Author Share Posted October 22, 2009 Thanks btherl. that works great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.