Unset (mixedvar [, mixedvar [,]) unset () destroys the specified variable. Note that in php3, unset () returns true (actually an integer value ).
Unset (mixed var [, mixed var [,...])
Unset () destroys the specified variable. Note that in php 3, unset () will return true (actually an integer value of 1). in php 4, unset () is no longer a real function: it is now a statement, so that 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, and is not empty. the isset () is false.
-
- $ A = array (
- 'A' => 'A ',
- 'B' => 'B'
- );
- $ B = array (
- 'A' => 'A ',
- 'B' => 'B'
- );
- $ A ['B'] = null;
- Unset ($ B ['B']);
- Print ('
');
- Print_r ($ );
- Print (' ');
- Print_r ($ B );
- Print ('');
- ?>
- /* Result:
- Array
- (
- [A] =>
- [B] =>
- )
- Array
- (
- [A] =>
- )*/