I have created a session that registers an array as a session variable(s). I refer to that array in a function. Usually, I will just use...
global $variable;
...but this doesn't work with arrays? Is there something different that I need to do? Here is the layout of my situation...
SESSION VARIABLES
$databse="whatever";
$permission_staff=1;
$permission[1]=1;
$permission[2]=1;
...
FUNCTION
function check($item) {
global $permission[];
if $permission[$item]==1 return "yes";
else return "no";
}
SUMMARY
Basically, should I use something different than "global" for the arrays as global variables??
Thanks for any help that can be provided.