isset() function in PHP - PHP Views : 300
Tagged in : PHP
0 0
Send mail
isset() function:
isset() determines whether a certain variable has already been declared by PHP. It returns a boolean value true if the variable has already been set, and false otherwise, or if the variable is set to the value NULL.

Consider the following script:

if (isset($first_name)) {

print '$first_name is set';

}

This code snippet checks whether the variable $first_name is defined. If $first_name is defined, isset() returns true , which will display ' $first_name is set. ' If it isn’t, no output is generated.
By Nirmala, On - 2010-05-04



    Login to add Comments .