'Permissions' is a comma separated list of integers, ex: 1,10,70,1000 The permissions string is shoved into $_SESSION, and then returned as $type after exploding
$permissions = $_SESSION['user']['permissions'];
$type = explode(",", trim($permissions));
if(in_array(1337, $type)){
echo '<li><a href="protectedpage.php">Page Name</a></li>';}
For some reason, nothing is echoed. I've echoed $_SESSION['user']['permissions'] and gotten 1337
I've done print_r($type) and gotten Array ( [0] => 1337 )
So why isn't in_array returning true?
1,2, 3,4if you compare string length to what you actually see in the dump.