PHP unset() Function

PHP var_dump() Function
PHP unserialize() Function

In this article, you will learn how to unset the variable. The unset() function in PHP unsets a variable.

what is the syntax of the UNSET() function in php?

unset(variable, ....);
ParameterDescription
variableRequired. Specifies the variable to unset
Optional. Another variable to unset
PHP UNSET() method

examples of the UNSET() function

Example 1. In this example, we unset variables.

<?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;
?>
PHP var_dump() Function
PHP unserialize() Function
en English
X
Scroll to Top