List Info

Thread: note 52869 deleted from function.session-decode by nlopess




note 52869 deleted from function.session-decode by nlopess
user name
2007-10-21 16:59:44
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


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )