📅  最后修改于: 2022-03-11 14:53:51.200000             🧑  作者: Mango
unset($array[$key]);
// You can do using function when no key
function unsetValue(array $array, $value, $strict = TRUE)
{
if(($key = array_search($value, $array, $strict)) !== FALSE) {
unset($array[$key]);
}
return $array;
}