Answers for "unset destroy variable php"

PHP
3

destroy php variable

<?php

$first = 100;
$second = 200;

$third = $first + $second;
echo "Sum = ".$third;
// Destroy a variable with unset function
unset($third);

//after delete the variable call it again to test
echo "Sum = ".$third;
?>
Posted by: Guest on August-23-2020
1

unset php

//remove variable
unset($var1,$var2,$var3;
//remove array
unset($array['$key']);
Posted by: Guest on October-08-2021

Code answers related to "unset destroy variable php"

Browse Popular Code Answers by Language