How to destroy the specified variables in PHP

Leave a Comment

Unset() method is used to unset a given variable.
Unset() destroy the specified variables.

Syntax
void unset(mixed $var[,mixed $var…])

Example
<?php
$xyz=’Jaldip’;
echo ‘Before using unset() the values of $xyz is : ’. $xyz.’<br>’;
unset($xyz);
echo ‘After using unset() the value of $xyz is : ’. $xyz;
?>

0 comments:

Post a Comment