PHP - How can I find out if a value exists in an array when compared?
<p>I have an array that looks like this:</p>

<pre><code>Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 1
            [id] =&gt; 1
        )

    [1] =&gt; Array
        (
            [0] =&gt; 2
            [id] =&gt; 2
        )
)
</code></pre>

<p>What I would like to do is compare an int value against what's in the id value field. So, if I were to pass in say a 1, I'd like to be able to have a function compare this. I was thinking in_array but I can't get that to work. Does anyone know what function I can use for this?</p>

<p>Thanks.</p>
