How to differentiate isset and empty

Answer Posted / p .g .senthilkumar

isset -> this variable handling functions determine whether
a variable is set . It checks whether a variable is set
even though it is empty.

empty -> as the term itself has already given a sign that
it would related to something that's empty, this variable
handling functions determine whether a variable is empty.
It checks whether a variable has a value whether it's empty
string, zero(0), or not set at all.

Is This Answer Correct ?    36 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the casts allowed in PHP?

565


How do you check if a variable has been set in php?

501


Why die is used in php?

543


How to open standard output as a file handle?

552


What is the meaning of symbol '$' in jquery?

521






How can we encrypt the password using php?

540


What is the difference between indexed and associative array?

494


What is a php form?

528


What is the difference between the include() and require() functions?

860


What PHP stands for?

562


What is the difference between echo, print and printf()?

491


Can I include php in javascript?

584


How to call javascript function in php without any event?

485


How arrays are passed through arguments?

596


Is salary fixed or variable cost?

517