+ 2

What is the purpose of isset?

29th Jul 2016, 8:58 AM
vidhya p naik
vidhya p naik - avatar
2 Answers
+ 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.
29th Jul 2016, 9:54 AM
Dodol Didil
Dodol Didil - avatar
+ 1
isset() is used for checking whether variable is have a value or not. You can also use 'NULL !== $xxx' instead of 'isset($xxx)'
15th Nov 2016, 12:30 AM
Fendi Septiawan
Fendi Septiawan - avatar