The title can be a bit confusing, but how can you process an array and return the value of the key based on a value given. This is basically for an array library that converts database meta-data into human-readable format.
Example:
$countries = array('US'=>'United States','MX'=>'Mexico');
The above array would be considered an array library. So when I do a query and in my results I only have the two country code, I would then need to convert that into human-readable format. Is there a function that if I send it the two country code it will return the human-readable format. This function would then need to be reusable with other array libraries. Example function:
function covert_to_human($key, $array_library)
$array_library[$key]