1unset($array[$key]);
2
3// You can do using function when no key
4
5function unsetValue(array $array, $value, $strict = TRUE)
6{
7 if(($key = array_search($value, $array, $strict)) !== FALSE) {
8 unset($array[$key]);
9 }
10 return $array;
11}