1.

Please explain the difference between isset() and empty()?

Answer»

1. isset(): It returns TRUE if the variable EXISTS and has a value other than NULL. It means variables assigned a "", 0, "0", or FALSE are set.

2. EMPTY(): It checks to SEE if a variable is empty. It INTERPRETED as: "" (an empty string).

isset($var) && !empty($var)

will be equals to !empty($var)



Discussion

No Comment Found