Tuesday, 31 January 2017

ISSET AND UNSET IN PHP

isset( ) – Using this function we can check whether the function is set with any value or not.

Example –
<?php
$x=100;
echo isset($x); // 1 (true)
echo isset($y); // nothing (false)
?>

Output –
1


unset( ) – Using this function we can delete the value of variable.

Example –
<?php
$x=100;
unset($x);
echo isset($x);
?> 

No comments:

Post a Comment