Posted by yawnmoth on 04/27/07 19:01
<?php
$var['a'] = 'test';
echo isset($var['a']['b']) ? 'true' : 'false';
echo '<br>';
echo isset($var['b']) ? 'true' : 'false';
?>
Why does that result in this output?:
true
false
It seems to me that it should instead output this:
false
false
Using array_key_exists instead works, but I'm not sure why isset
doesn't? Is this maybe a PHP bug?
[Back to original message]
|