I have a session variable that contains the following string.
a:2:{s:7:"LoginId";s:32:"361aaeebef992bd8b57cb3e8d";s:8:"Username";s:6:"aaaaaa";}
echo $_SESSION["SecurityAccess_CustomerAccess"];
I am trying to extract the username "aaaaaa". What combination of unserialize, preg_split or other will get me there fastest?
attempts so far...
$session_data = unserialize($_SESSION["SecurityAccess_CustomerAccess"]);
$session_user_array = preg_split('%;%', $_SESSION["SecurityAccess_CustomerAccess"]);
echo $session_user_array[3];