hello,

I'd like to know if there is a more elegant and smoother way to retrieve some array 
elements with given keys and put them into an other array.
Yes, I can write a function like the following, but maybe I missed some new PHP 
awesome feature or array function which does this job.
So, is there anything which makes this function obsolete?

function array_part($fromarray, $keys)
{
    foreach($fromarray as $key => $val)
    {
        if (in_array($key, $keys)
           $anotherarray[$key] = $val;
    }
    return $anotherarray;
}

Papp Gyozo 
- [EMAIL PROTECTED]

Reply via email to