Why we use isset in PHP?

Last updated 2 years, 8 months ago | 709 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