PHP search array in array

Use array_filter to filter the array:

function test($arr) { 
    return $arr["info_type_id"] == 4; 
}

echo count(array_filter($yourArray, "test"));

Leave a Comment