[英]PHP complex check between different arrays
My goal is to decide if the $iCurrentMembershipId
can access the $aCurrentMenu
array based on: if the $iCurrentMembershipId
is in the $aRescrictAccess
array. 我的目标是根据以下条件决定
$iCurrentMembershipId
可以访问$aCurrentMenu
数组: $iCurrentMembershipId
是否在$aRescrictAccess
数组中。
if(is_array($aRescrictAccess)){
// Not sure what to do
}
Ultimately, I would need deny access to the page if the users $iCurrentMembershipId
is in the $aRescrictAccess
array. 最终,如果用户
$iCurrentMembershipId
位于$aRescrictAccess
数组中,则需要拒绝对该页面的访问。
if(is_array($aRestrictAccess)){
if(in_array($iCurrentMembershipId, $aRestricAccess) === FALSE){
/* display $aCurrentMenu */
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.