Re: Mystery foreach error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 13, 2013, at 5:02 PM, David Harkness wrote:
> isset() will return false for an array key 'foo' mapped to a null value whereas array_key_exists() will return true. The latter asks "Is this key in the array?" whereas isset() adds "and is its value not null?" While isset() is every-so-slightly faster, this should not be a concern. Use whichever makes sense for the context here.

Hi David,

	Thank you for the explanation.  It's nice to know the difference between them.  Since they are equivalent for my use, I went with array_key_exists, simply because it makes more sense to me in English. ;)

	Thanks again to everyone.  I got it to work _and_ there are no more errors!!!

Angela
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux