:: I'm creating an associative array that creates keys and values for
:: those keys on the fly. Later I need to check and see if the array
:: contains a key before I call it to avoid the dreaded "Undefined
:: Index" error. Is it possible to see if a key exists in an
:: associative array before I call it? Kind of like the "isset" to
:: check if a variable exists before you call it, and it doesn't error
:: out on you.
Do you know the key before hand? If so, you can do something like
this:
if( isset( $array["key"] )) {
}
If you don't know, you can check out the following page:
http://www.php.net/manual/en/function.key.php
Chris
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php