Why we use isset in PHP?

232 Views

Why we use isset in PHP?

isset()

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

 
 <?php

    $var = "StudyZone4U.com";

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

?>

// Output 
StudyZone4U.com

 

Tags:-
PHP