Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有一个 php 数组方法可以告诉我一个数组是否有数组作为它的值而不做一个 foreach 循环?
print_r(array_filter($array, "is_array"));
您可以使用array_filter
array_filter
$array = array(1,array(),2); ^--------------- array in array if(array_filter($array,"is_array")) { // I found some arrays }