I want a quick easy way to copy an array but the ability to specify which keys in the array I want to copy.
I can easily write a function for this, but I'm wondering if there's a PHP function that does this already. Something like the 'array_from_keys' function below.
$sizes = array('small' => '10px', 'medium' => '12px', 'large' => '13px');
$chosen = array_from_keys($sizes, 'small', 'large');
// $chosen = array('small' => '10px', 'large' => '13px');