我有以下父数组,并且我试图从这个父数据库中获取另一个数组中缺少的元素。需要与模块和动作进行比较才能相同。
Parent
(
[0] => Array
(
[label] => Masters
[module] => masters
[action] => unit_index
)
[1] => Array
(
[label] => Appointments
[module] => appointments
[action] => appointment_index
)
[2] => Array
(
[label] => Transactions
[module] => transactions
[action] =>
)
[3] => Array
(
[label] => Reports
[module] => p_reports
[action] => ds_index
)
)
我想在以下子数组
中获取Parent中缺少的项目Array
(
[masters] => Array
(
[label] => Masters
[action] => unit_index
[module] => masters
)
[transactions] => Array
(
[label] => Transactions
[action] =>
[module] => transactions
)
[p_reports] => Array
(
[label] => Reports
[action] => ds_index
[module] => p_reports
)
)
我尝试使用in_array进行搜索,并在数组中使用递归的某些版本,但我无法使用多个键进行搜索。
答案 0 :(得分:0)