Home / PHP Tips Generated By ChatGPT / Unsetting an Array Element in PHP Remove an element from an array using unset(). Source Code $array = ["apple", "banana", "cherry"]; unset($array[1]); // Removes "banana" from the array print_r($array);