ensnare wrote:
Hi all,
I’m using a database session handler and am looking to loop through
data residing in the sessions table to make a ’Users online’ array.
I’ve found that using urldecode on the data column gives me a
serialized string of varname|datatype:data; for each variable. I’m
having a bit of trouble with deserializing the data.
I could always use regexps to grab the specific data I want, but
I’m sure there’s a better way to do this. Any help is greatly
appreciated.
Thanks much!
PHP has a nice way of looping thru variables inside an array so with
query string you can do something like this:
foreach ($GET as $key => $value) {
//not do something with $value[$key]...
}
same for cookies, $_PUT, $_SERVER, etc.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-Looping-...ict124156.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=413682