Cameron B. Prince wrote:
Hi,

How would I go about determining if a specific key exists in an array?

I want to see if $conf['hOpt'] is defined. is_array only works at the $conf
level.


You want:


if(isset($conf['hOpt'])) {
 ...
}

You should always use isset to check if a variable is set, whether it is a straight variable, an array index, or an object member.

--
paperCrane <Justin Patrin>

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



Reply via email to