不同数组之间的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 */
}
}