SyntaxFix
Write A Post
Hire A Developer
Questions
A one-liner using the or operator:
or
($key = array_search($del_val, $messages)) !== false or unset($messages[$key]);