Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不同数组之间的PHP复杂检查_Php - Fatal编程技术网

不同数组之间的PHP复杂检查

不同数组之间的PHP复杂检查,php,Php,我的目标是决定 $iCurrentMembershipId可以访问 $acurrent菜单数组 基于:如果 $iCurrentMembershipId位于 $aRescrictAccess数组 if(is_array($aRescrictAccess)){ // Not sure what to do } 最后,如果用户$iCurrentMembershipId在$arescricAccess数组中,我需要拒绝访问该页面。如何构造$arescricAccess数组和$aCurrentMe

我的目标是决定
$iCurrentMembershipId
可以访问
$acurrent菜单
数组 基于:如果
$iCurrentMembershipId
位于
$aRescrictAccess
数组

if(is_array($aRescrictAccess)){
   // Not sure what to do
}

最后,如果用户
$iCurrentMembershipId
$arescricAccess
数组中,我需要拒绝访问该页面。

如何构造
$arescricAccess
数组和
$aCurrentMenu
数组?
if(is_array($aRestrictAccess)){
    if(in_array($iCurrentMembershipId, $aRestricAccess) === FALSE){
        /* display $aCurrentMenu */
    }
}