我有一个这种格式的数组,我想从任何键检查数组中是否有一个 var link
$nav = array(
'Account Settings' => array(
'icon' => 'fa-cog',
'Account Settings' => array(
'link' => '/voip/settings?seq='.$seq,
'icon' => 'fa-cog',
),
'Provisioning' => array(
'link' => '/voip/provisioning?seq='.$seq,
'icon' => 'fa-wrench',
),
'E999 Data' => array(
'link' => '/voip/e999?seq='.$seq,
'icon' => 'fa-life-ring',
),
'Delete Account' => array(
'link' => '/voip/delete?seq='.$seq,
'icon' => 'fa-trash',
),
),
'Mailboxes' => array(
'link' => '/voip/mailboxes?seq='.$seq,
'icon' => 'fa-envelope',
),
'Telephone Numbers' => array(
'link' => '/voip/numbers?seq='.$seq,
'icon' => 'fa-hashtag',
),
);
我试过了,if(in_array($_GET["nav"], $nav)但它没有选择嵌套的值
有没有办法做到这一点?
动漫人物
临摹微笑