Is there a php array method that can tell me if an array has arrays as its values without doing a foreach loop?
2 Answers
You can use array_filter
$array = array(1,array(),2);
^--------------- array in array
if(array_filter($array,"is_array"))
{
// I found some arrays
}
-
Thanks. Id choose you since you used it in an if statement, but its pretty much the same as the other one.somejkuser– somejkuser11/11/2012 13:00:37Commented Nov 11, 2012 at 13:00