MySQL SELECT WHERE php array equivalent
<p>I am wanting to know if there is such a thing like the MySQL SELECT WHERE but in arrays.</p>

<p>I have this array:</p>

<pre><code>$array = array( 1 =&gt; array('test' =&gt; '1',   'test2' =&gt; '2'  ),
                 2 =&gt; array('test' =&gt; '4','test2' =&gt; '2'
               )

);
</code></pre>

<p>I am basically wanting all the records where 'test2' = '2'. So my result should be the id's 1,2.</p>

<p>Can this be done?</p>
