\R\N wrote: > I'm not a experter of PHP and I even need other people's help to read PHP > source code, but in the information from the document and the talking with > other people gives me some guts to guess the $string['check'][0] actually > will be converted into $string[(int)'check'][0] and then into $string[0][0], > so the test 1 can be pass. Is that right? Yes. > So, what I want to know is, why there has two kind of behaviour for isset? > Maybe it's better to let the isset($string['check'][0]) and > isset($string['check']) both return false? The behavior of isset is fine. Consider that $string['check'] is treated as $string[0], so it evaluates to a string with only the first character of $string. Then it is checked, whether this string has a character at position zero. As this is true, isset returns true. You may consider using array_key_exists() instead of isset(). -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php