![]() ![]() It meanse If(FALSE) will print the statements which are inside the ELSE condition which is “The Variable ‘b’ is now unset” because IF condition is FALSE and gone to the ELSE condition. So the “isset($b)” will return the “FALSE” value. ![]() Then variable “b” is created by assigning the NULL value. If the IF condition returns FALSE value then the ELSE condition’s statements will be printed. It will print “The variable ‘a’ is now set”. If the IF condition of TRUE value then the statements inside the IF condition will be printed. It means the value is set for the variable a. Example #2Įxplanation: In the above example, a new variable “a” is created using with the value “10”. If the isset() function will return/print the value “FALSE” if the isset() returns FALSE value. Then an isset() function inside the IF condition is made to return the value TRUE or FALSE but here the variable “a” is defined so the output is obviously “TRUE”. Examples to implement isset() Function in PHPĮxplanation: In the above isset() program, a variable ‘a” is declared and also defined with the value “10”. From the PHP 5.4.0 version, non-numeric offsets of strings will return FALSE value/values. Isset() function also works by accepting the multiple variables/many variables etc. The variable of the isset() function can be unset using the unset() function. If the PHP isset() function are passed with the multiple variables then isset() will TRUE only if all the variables are set. The return type of the isset() function of PHP programming language is Boolean. The isset() function works from the PHP version 4.0. The isset() function works by returning the value TRUE if the $variable exists in the isset() function (isset() programming code) which has the value which is other than NULL value. : It is an optional value/values or variable/variables to check $variable: A variable is required which is specified to check.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |