以下に示す2つのforループがあります
foreach($result_access as $acc){
$usr_access_id[] = $acc->id;
$usraccess[] = $acc->rules;
}
>更新
foreach($somearray as $someid){//Updated
foreach($usraccess as $accessusr){
if(in_array($someid,$usraccess)){
$myid = ??;///Here i want the $usraccess associated $acc->id, how can I get that?
}
}
}
ご覧のとおり、現在の配列に関連付ける必要がある$myid
割り当てを取得する必要があります$acc->id
$usraccess