📅  最后修改于: 2022-03-11 14:53:36.706000             🧑  作者: Mango
function getNames(array $users, $excludeId)
{
$filtered = array_filter($users, function ($u) use ($excludeId) {
return $u['id'] != $excludeId;
});
return array_map(function ($u) { return $u['name']; }, $filtered);
}