if (empty versus if (isset
| From: | John Taylor-Johnston | Date: | Wed, 20 Feb 2013 02:29:23 +0000 |
| Subject: | if (empty versus if (isset | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-320252@lists.php.net to get a copy of this message | ||
What is the difference between?
if (empty... http://www.php.net/manual/en/function.empty.php "Determine whether a variable is empty"
and
if (isset... http://php.net/manual/en/function.isset.php "Determine if a variable is set and is not *|NULL|*"
I have an <input type="radio" value="something">.
If it is not checked, it is NOT empty, because it has a value, right?
But it is NOT set, right?
Is this empty, because it's value is ""?
<input type="text" value="">
Just trying to understand ... :)