I have an array that contains some user data. Now I'd like to add some logic based on the role, but am unable to get the value. I've tried the following way:
session_start();
$a = unserialize($_SESSION['user']['data']['role']);
foreach ($a as $b) {
echo $b;
}
When I just print $_SESSION['user']['data']['role'] I get Array()
It seems "unserialize" doesn't want to work in this case...
What am I doing wrong?