The Isset function is to detect whether a variable is set.
Format: bool Isset (mixed var [, mixed Var [, ...]])
return value:
Returns FALSE if the variable does not existReturns FALSE if the variable exists and its value is nullReturns ture if
By learning the language of PHP, you should know that it is a function-based HTML scripting language. The large library of functions supports the implementation of PHP language functions. Let's introduce the relevant usage of PHP function isset ()
Share the usage of the three functions ISSET (), empty (), and is_numeric () in PHP form verification. For more information about php learning, see.
Share the usage of the three functions ISSET (), empty (), and is_numeric () in PHP form
Use of the three functions ISSET (), empty (), and is_numeric () in PHP form verification. ISSET (); -- this parameter is suitable for detecting whether this parameter exists. Definition and scope of action: used to test whether a variable has a
The difference between empty () and isset () in PHP. Differences between empty () and isset () in PHP 1. purpose of the empty function: checks whether the variable is null. If var is not null or a non-zero value, empty () returns FALSE. In other
Share the usage of the three functions ISSET (), empty (), and is_numeric () in PHP form verification. For more information about php learning, see. ISSET (); -- this parameter is suitable for detecting whether this parameter exists.
Definition and
Original: The use of 3 functions isset (), Empty (), and Is_numeric () for forms validationThis article briefly about the form validation in PHP three functions, it should be more common, and finally give some examples, see below.ISSET ();--suitable
ISSET ();--suitable for detecting the presence of this parameter.
Definition and scope: used to test whether a variable has a value (including 0,false, or an empty string, but not null), that is: "http://localhost/?fo=" is also detectable and
The difference between empty () and isset () in PHP
1, empty function use: detect whether the variable is null judgment: If VAR is a non-null or nonzero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, Array (), Var $var; and
The following sample code is used to explain:
1. When loading the page for the first time, because the form is not submitted, $ _ post is an empty array. At this time, $ _ post ['name'] is null, that is, the variable $ name has not been set,
Isset
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.