📅  最后修改于: 2022-03-11 14:53:38.179000             🧑  作者: Mango
function lookup($array, $key) {
//loop through all values in array
foreach($array as $values) {
//if 'key' value matches `$key`, return 'value' value.
if($values['key'] == $key) {
return $values['value'];
}
}
//if nothing has been returned, return empty string
return "";
}