October 2005
Intermediate to advanced
372 pages
11h 35m
English
unset()
void unset ( mixedvar[, mixedvar[, mixed ...]] )
The unset()
function deletes a variable so that isset() will return false. Once deleted, you can recreate a variable later on in a script.
$name = "Paul";
if (isset($name)) print "Name is set\n";
unset($name);
if (isset($name)) print "Name is still set\n";That would print out "Name is set", but not "Name is still set", because calling unset() has deleted the $name variable.