我有一个如下所示的数组 -
Array (
[0] => Array (
[name] => 3DModel
[url] =>psde/img/lanai-1024x480.jpg
)
[1] => Array (
[name] => BuilndingModel
[url] => psde/img/lot34-front.jpg
)
[2] => Array (
[name] => 3DModel
[url] => psde/img/home-1024x480.jpg
)
)
我只想提取包含我指定的特定值的数组,例如,我想提取包含键“name”=“3Dmodel”的值的数组。对于上面的示例,我只想获取数组 -
[0] => Array (
[name] => 3DModel
[url] => /psde/img/lanai-1024x480.jpg
)
[2] => Array (
[name] => 3DModel
[url] => psde/img/home-1024x480.jpg
)
有没有办法做到这一点?......这样的事情
$arr = array( 'element1' => 1, 'element2' => 2, 'element3' => 3, 'element4' => 4 );
$filterOutValue = array( 2, 4 );