Мне нужно проверить, будет ли данный массив соответствовать другому массиву. Я не могу понять, как либо манипулировать первым массивом, либо сопоставить его другим способом
Мне нужно сопоставить этот массив:
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
)
Помощь будет принята с благодарностью!