【发布时间】:2016-09-11 08:00:04
【问题描述】:
我有这个 3D 数组,我试图通过内部数组中的“类别”字段对其进行过滤,但我无法完全正确。
Array(
'type' => 'success',
'value => array (
0 => array (
'id' => 1,
'joke' => 'Chuck Norris uses ribbed condoms inside out, so he gets the pleasure.',
'categories' => array());
1 => array (
'id' => 2,
'joke' => 'MacGyver can build an airplane out of gum and paper clips. Chuck Norris can kill him and take it.',
'categories' => array(
[0] => nerdy
));
);
);
我已尝试使用 array_filter,但无法使其正常工作。
谢谢!
【问题讨论】:
-
请添加您当前的代码
标签: php arrays array-filter