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.


    $array = [0 => "a", 1 => "b", 2 => "c"];
                //↑ Key which you want to delete