Question: I have this array:

```
$a = array('it' => 'italiano',
                 'fr' => 'francese',
                 'en' => 'inglese',
                 'es' => 'spagnolo',
                 'de' => 'deutsch',

               );

```

Is there any function that i give as arguments the array and a key (for example 'en') and it returns 'inglese'?

Regards

Javi

Answer: 
What's wrong with using `$a['en']`? Which would give 'inglese' as well.

```
function get_value($array, $key){
  return (isset($array[$key]) ? $array[$key] : null;
}

echo get_value($array, 'en'); # => echoes inglese

```
Why not simply do:

```
echo $a['en'];

```

This will give you `inglese`