Funkce PHP unset()
❮ Reference manipulace s proměnnými PHP
Příklad
Nenastavené proměnné:
<?php
$a = "Hello world!";
echo
"The value of variable 'a' before unset: " . $a . "<br>";
unset($a);
echo
"The value of variable 'a' after unset: " . $a;
?>
Definice a použití
Funkce unset() zruší nastavení proměnné.
Syntax
unset(variable, ....);
Hodnoty parametrů
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
Technické údaje
Návratová hodnota: | Žádný |
---|---|
Typ vrácení: | Žádný |
Verze PHP: | 4,0+ |
❮ Reference manipulace s proměnnými PHP