Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?
foreach ($array)
I thought that setting it
Use array_search to get the key and remove it with unset if found:
if (($key = array_search('word', $array)) !== false) { unset($array[$key]); }