The unset() function in PHP resets any variable. If unset() is called inside a user-defined function, it unsets the local variables. If a user wants to unset the global variable inside the function, then he/she has to use $GLOBALS array to do so. The unset() function has no return value.
<?php $array = [0 => "a", 1 => "b", 2 => "c"]; unset($array[1]); //↑ Key which you want to delete ?>