我正在尝试获取任何具有“release_”键的数据......我想我应该使用 array_filter,但我很难为参数 2 编写正确的函数。
这是我的数组:
Array
(
[release_date] => Array
(
[type] => date
[value] => 1999-03-31
)
[duration] => Array
(
[type] => time
[value] => 136
)
[directors] => Array
(
[type] => page
[value] => 13,14
)
[writers] => Array
(
[type] => page
[value] => 13,14
)
[release_us] => Array
(
[type] => date
[value] => 1999-03-30
)
[release_ge] => Array
(
[type] => date
[value] => 1999-06-16
)
)
我希望我的返回数组只有 release_ 存在的数组..所以它看起来像:
Array
(
[release_date] => Array
(
[type] => date
[value] => 1999-03-31
)
[release_us] => Array
(
[type] => date
[value] => 1999-03-30
)
[release_ge] => Array
(
[type] => date
[value] => 1999-06-16
)
)