Unset (mixed var [, mixed var [,...])
Unset () destroys the specified variable. Note that in php Tutorial 3, unset () will return true (actually an integer value of 1), while in php 4, unset () is no longer a real function: it is now a statement. In this way, no return value is returned. An attempt to obtain the return value of unset () will cause a parsing error.
Null bytes indicate that the variable is null $ t = ''. The variable has a value, but is null. The isset () parameter is true.
The null constant is $ t = null. The variable has no value. It is not even null, and isset () is false.
<? Php
$ A = array (
'A' => 'A ',
'B' => 'B'
);
$ B = array (
'A' => 'A ',
'B' => 'B'
);
$ A ['B'] = null;
Unset ($ B ['B']);
Print ('<pre> ');
Print_r ($ );
Print ('<br/> ');
Print_r ($ B );
Print ('</pre> ');
?>
Result:
Array
(
[A] =>
[B] =>
)
Array
(
[A] =>
)