Why is array_search failing
<pre><code>$arr =array('username','admin');
foreach($_GET as $k=&gt;$v)
    if(array_search($k, $arr))
        $results[$k] = $v;

print_r($results); // prints nothing and I get a
//$results is undefined error
</code></pre>

<p>$_GET contains:</p>

<pre><code>(
     [r] =&gt; p/p
     [i] =&gt; 9
     [_s] =&gt; true
     [r] =&gt; 10
     [p] =&gt; 1
     [s] =&gt; username
     [o] =&gt; asc
     [username] =&gt; bd
)
</code></pre>

<p>so I would expect my $results array to contain 'bd' but instead it is undefined.</p>
