title: Search for a key in an array, recursively
body: <pre><code>private function find($needle, $haystack) {
      foreach ($haystack as $name =&gt; $file) {
          if ($needle == $name) {
              return $file;
          } else if(is_array($file)) { //is folder
              return $this-&gt;find($needle, $file); //file is the new haystack
          }               
      }
  
      return "did not find";
  }
  </code></pre>
  
  <p>Hey, this method searches for a specific key in an associative array and returns the value associated with it. There's some problem with the recursion. Any clue?</p>