It just comes down to a crazy PHP type system.
$fruits['response']['errormessage'] is the string 'banana' , so you are trying to access the character in this string by the index ['orange'] .
The string 'orange' converted to an integer for indexing, so it becomes 0 , as in $fruits['response']['errormessage'][0] . The 0th row index is the first character of the string, so for non-empty strings it is essentially given. Thus isset() returns true.
I don’t know what you are trying to do first, so I can’t offer any “fixes” for this. This is by design.
source share