data-id="1190000005075514" data-license="nd">
Filter function
<code>function my_filter($arr){ $filterDatum = 'what you set'; foreach($arr as $k => &$item){ if(is_array($item){ my_filter($item); }else{ // item is an element if($item == $filterDatum){ unset($arr[$k]); } } } return $arr; } </code>
Filter implementation statement
<code>$arr = [ // who know what the array looks like. ]; $arr = array_filter($arr, 'my_filter'); </code>
BINGO
Reference
Q&A on this site
The above has introduced the summary | PHP multi-dimensional array filtering method, including the content of PHP multi-dimensional arrays. I hope it will be helpful to friends who are interested in PHP tutorials.