我需要检查给定的数组是否会匹配另一个数组。我不知道如何操作第一个数组,或者以其他方式匹配它。
我需要匹配这个数组:
Array
(
[1] => site
[2] => blog
[3] => index.php
)
匹配这个:
Array
(
[site] => Array
(
[path] => site
[name] => site
[kind] => directory
[content] => Array
(
[404] => Array
(
[path] => site/404.php
[name] => 404.php
[extension] => php
[kind] => file
)
[blog] => Array
(
[path] => site/blog
[name] => blog
[kind] => directory
[content] => Array
(
[contact] => Array
(
[path] => site/blog/contact.php
[name] => contact.php
[extension] => php
[kind] => file
)
[index] => Array
(
[path] => site/blog/index.php
[name] => index.php
[extension] => php
[kind] => file
)
[about] => Array
(
[path] => site/blog/about.php
[name] => about.php
[extension] => php
[kind] => file
)
)
)
[index] => Array
(
[path] => site/index.php
[name] => index.php
[extension] => php
[kind] => file
)
)
)
)
并返回文件的内容数组:
[index] => Array
(
[path] => site/blog/index.php
[name] => index.php
[extension] => php
[kind] => file
)
帮助将不胜感激!