//NO KEY supplied $message array("a", "b", "c", "d"); $del_val = "b"; if (($key = array_search($del_val, $messages)) !== false) { unset($messages[$key]); }