Find Element in PHP Array (if exists)
<p>I'm wondering if there is a more elegant way to do this:</p>

<pre><code>$foo = (isset($bar) and array_key_exists('meh', $bar)) ? $bar['meh'] : '';
</code></pre>

<p>If I remove the <code>isset</code> part, PHP issues a warning if <code>$bar</code> isn't an array, if I remove the <code>array_key_exists</code> part, PHP issues a warning if the <code>meh</code> key isn't in the array.  Is there a more graceful, warning free, way of achieving the same end?</p>
