+ 2
What is the purpose of isset?
2 Réponses
+ 5
to make sure the variable you are going to use has been set before. it is good habbit especially when you are dealing with post data or get or any method that rely on user input.
+ 1
isset() is used for checking whether variable is have a value or not.
You can also use 'NULL !== $xxx' instead of 'isset($xxx)'