title: PHP array_key_exists and is not empty
body: <p>Following on from a previous question, I am now using the following function to check if a key exists in a multi-dimensional array...</p>
  
  <pre><code>function array_key_exists_r($needle, $haystack) {
          $result = array_key_exists($needle, $haystack);
          if ($result)
              return $result;
  
          foreach ($haystack as $v) {
              if (is_array($v) || is_object($v))
              $result = array_key_exists_r($needle, $v);
              if ($result)
              return $result;
          }
  
          return $result;
      }
  </code></pre>
  
  <p>I am checking like this...</p>
  
  <pre><code>if (array_key_exists_r("image",$myarray)) {
  echo 'Array Key Image Exists';
  }
  </code></pre>
  
  <p>But now I am trying to modify it or the result to check that key is not empty, can I do this inside the function or should I do something with the output of the function?</p>
  
  <p>Or should I be using isset instead?</p>