public static function findKeyInATree($data, $key, $hashes = []) {
		if (!empty($data[$key])) {
			$hashes[] = $key;
			return $hashes;
		} else {
			foreach ($data as $k => $v) {
				if (empty($v['options'])) {
					continue;
				}
				$hashes2 = $hashes;
				$hashes2[] = $k;
				$hashes2[] = 'options';
				$result = self::find_key_in_a_tree($v['options'], $key, $hashes2);
				if ($result !== false) {
					return $result;
				}
			}
		}
		return false;
	}
public static function findKeyInATree($data, $key, $hashes = []) {
		if (!empty($data[$key])) {
			$hashes[] = $key;
			return $hashes;
		} else {
			foreach ($data as $k => $v) {
				if (empty($v['options'])) {
					continue;
				}
				$hashes2 = $hashes;
				$hashes2[] = $k;
				$hashes2[] = 'options';
				$result = self::find_key_in_a_tree($v['options'], $key, $hashes2);
				if ($result !== false) {
					return $result;
				}
			}
		}
		return false;
	}
public static function findKeyInATree ( $ data , $ key , $ hashes = [ ] ) { if ( ! empty ( $ data [ $ key ] ) ) { $ hashes [ ] = $ key ; return $ hashes ; } else { foreach ( $ data as $ k => $ v ) { if ( empty ( $ v [ 'options' ] ) ) { continue ; } $ hashes2 = $ hashes ; $ hashes2 [ ] = $ k ; $ hashes2 [ ] = 'options' ; $ result = self :: find_key_in_a_tree ( $ v [ 'options' ] , $ key , $ hashes2 ) ; if ( $ result !== false ) { return $ result ; } } } return false ; }
Find a key in a tree

@param array $data
@param mixed $key
@param array $hashes
@return mixed
Find a key in a tree