|
|
isset() function in PHP - PHP
|
Views : 300
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|