How to get the uneven keys from an array?
<p>I have to create a function that copy the array(that i pass to the function) with only uneven keys. Example:</p>

<pre><code>$a = array(
  '0'   =&gt; '0',
  'one  =&gt; 'one',
  '1'   =&gt; '1',
  'two' =&gt; 'two'
)
</code></pre>

<p>I have to get:</p>

<pre><code>$result = array(
  'one  =&gt; 'one',
  'two' =&gt; 'two'
)
</code></pre>

<p>I have created the follow function, it works, but maybe I need to optimize it(maybe exists a function that does this job). Advice?</p>

<pre><code>private clean($values){
    $vv   = array();            
    $keys = array_keys($values);        

    for($i=1; $i &lt; count($values); $i+=2) $vv[$keys[$i]] = $values[$keys[$i]];              
    return $vv;
}
</code></pre>

<p>Thanks</p>
