我有 assoc php 数组
0 => array
(
'categoryName' => 'Moto'
'categoryTitle' => 'Moto'
'categorySlug' => 'moto-and-tech'
'categoryAttr' => array
(
0 => 'test1'
1 => 'test2'
2 => 'test3'
3 => 'test4'
)
'categoryNested' => array
(
0 => array
(
'categoryName' => 'anything'
'categoryTitle' => 'anything'
'categorySlug' => 'anything'
'categoryAttr' => array
(
0 => 'test1'
1 => 'test1'
2 => 'test1'
3 => 'test1'
)
'categoryNested' => array()
)
1 => array
(
'categoryName' => 'any'
'categoryTitle' => 'any'
'categorySlug' => 'any'
'categoryAttr' => array
(
0 => 'test1'
1 => 'test1'
2 => 'test1'
3 => 'test1'
)
'categoryNested' => array()
)
我如何搜索插入的数组key(catgorySlug)
,并返回所有父元素 categoryName ?