Reputation: 895
I have a public
variable declared as array in class which is being used locally in class but I'm unable to use it outside the class.
below is the code
class permissions {
public static $departments = array(
"Engineering"=>array(
'ONM','ESS','NP','NC','Engineering'
)
);
// remaining code is left out for brevity
}
How i can access $department
in class declaration?
I was expecting this way permissions::departments;
but getting error Undefined class constant 'departments'
.
Upvotes: 0
Views: 1627