Why we use isset in PHP?

Last updated 5 years ago | 1476 views 75     5

Tags:- PHP

PHP | isset()

The isset () function is used to check whether a variable is set or not. It returns true if a variable is set otherwise it returns false.

 
<?php

    $var = "StudyZone4U.com";

    if(isset($var))
    {
        echo "var";
    }

?>

// Output 
StudyZone4U.com