|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-09-22 12:52 UTC] marrtins at hackers dot lv
Description: ------------ need to store session decoded data in array not only in variables. thnx! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
so i'll try to explain now :) my homepage uses sessions(i wrote a session handler) to store users information - some username, visited sections, etc data i wrote a script, to check who is online right now - scanning for sessions active in last 3 minutes. script reads those session data from mysql table. data looks like this: $session_data="user|a:2:{s:8:"username";s:6:"foobar";s:9:"useremail";s:0:"";}<some other data>..." sou, it will be usefull to have function to get all these variables in one array. for example $session_vars = get_session_vars($session_data); as a result will be $session_vars['username'] = 'foobar'; $session_vars['useremail'] = ''; ... and so on.