Jump to content

undefined variable problem with array


hisuwh

Recommended Posts

I have the following array and function definition:

$permissions = array('postEvent' => 6, 'editBlog' => 6);  function permission($action){if (isset($_SESSION['type'])&&($_SESSION['type']>=$permissions[$action])){  return true;} else {  return false;}}

When I call the function - permission('editBlog') - I get the error message "Notice: Undefined variable: permissions" But the variable clearly is defined so I don't get the problem! Any help?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...