Note Submitter: Sasha Rudenko
----
Here is fixed function which was described here
function unserializesession($data) {
$vars=preg_split('/([a-z_,A-Z_]+)|/',$data,-1,PREG_SPLIT_NO
_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
for($i=0; $vars[$i]; $i++) {
$result[$vars[$i++]]=unserialize($vars[$i]);
}
return $result;
}
I've just fix regexp, it doesn't handle names with _
(underline) sign.
But anyway, thanks for author, this function was very useful
for me
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|