PHP: is_array on $arr['key'] with non existing 'key'
<p>One of my colleges seem to have an 'undefined index' error on a code I wrote  </p>

<p>This code of mine looks like this:</p>

<pre><code>if ( is_array ($arr['key'])) 
</code></pre>

<p>My intention was to check whether $arr has a key named 'key', and if the value of that key is array itself. Should I do instead: <code>if( isset($arr['key']) &amp;&amp; is_array ($arr['key']))</code> ?</p>

<p>Maybe the following is equivavlent:
Let's assume $var is not set. Then, will is_array($var) cause an error or will it just return false?</p>

<p>Thank you</p>
