PHP multi dimensional array search
<p>i have an array where i want to search the uid and get the key of the multidimensional array
for eg search 100(uid of first user) and the function should return 0 and if i search 40489 the function should return 2
I tried making loops but i want a faster exxecuting code, Any help :(</p>

<pre><code>$userdb=Array
(
    (0) =&gt; Array
        (
            (uid) =&gt; '100',
            (name) =&gt; 'Sandra Shush',
            (url) =&gt; 'urlof100'
        ),

    (1) =&gt; Array
        (
            (uid) =&gt; '5465',
            (name) =&gt; 'Stefanie Mcmohn',
            (pic_square) =&gt; 'urlof100'
        ),

    (2) =&gt; Array
        (
            (uid) =&gt; '40489',
            (name) =&gt; 'Michael',
            (pic_square) =&gt; 'urlof40489'
        )
);
</code></pre>
