Ben aşağıdaki dizeyi içeren bir oturum değişkeni var.
a:2:{s:7:"LoginId";s:32:"361aaeebef992bd8b57cb3e8d";s:8:"Username";s:6:"aaaaaa";}
$ _SESSION ["SecurityAccess_CustomerAccess"] echo;
I am trying to extract the username "aaaaaa". What combination of unserialize, preg_split or other will get me there fastest?
Şimdiye kadar çalışır ...
$session_data = unserialize($_SESSION["SecurityAccess_CustomerAccess"]);
$session_user_array = preg_split('%;%', $_SESSION["SecurityAccess_CustomerAccess"]);
echo $session_user_array[3];