Yes but you certainly can check ANY variable with isset(), not just
superglobal arrays.

In addition to the technical differences between empty() and isset(), I
would add that empty() is quite convenient and under-utilized. Consider

if (isset($_GET['q'] && $_GET['q']) { ........ }

versus

if (!empty($_GET[) { ....... }


empty() also has a cooler, more Zen-like name.


On 5/18/07, David Krings <[EMAIL PROTECTED]> wrote:

>
isset() checks if a key exists in a server array such as $_SESSION or
$_POST regardless of the value, which can be NULL or an empty string. I
never used empty(), but just by the name of it that function checks if
the value of a given variable or array key is considered "nothing" for
the respective variable type.




--
David Mintz
http://davidmintz.org/

Just a spoonful of sugar helps the medicine go down
In a most delightful way.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to