Using wildcards in in_array

I want to search element [21] of a multi-dimensional array with in_array. So I have an array that is [‘field’][21] where x is the element number and I want to see if the value I am looking for is in element #21 in any of the x elements of [‘field’]. I know I can do this with a for type statement but was wondering if there was some kind of wildcard I could use to say search all elements for item [21]. Thanks

Use a foreach loop to provide a $key $item lookup service.


foreach ($arr['field'] as $key => $item) {
    if ($item[21] === $value) {
        echo 'Found ' . $value . ' in ' . $key;
    }
}