On Sun, Apr 29, 2001 at 09:50:13PM -0400, David Croft wrote:
> There doesn't seem to be any way for a php script to determine whether a
> given key exists in an array. isset($arr['x']) fails when it exists but
> has a null value. I know there are ways around it like using foreach or
> array_keys but these don't seem very efficient.
Wouldn't empty() handle that case?
e.g. if (!empty($arr['x'])) echo $arr['x'];
--
Jon Parise ([EMAIL PROTECTED]) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House Member
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]