public function getChildKey(array $array) {
    reset($array);
    $first_parent_key = key($array);
    if (is_array($array[$first_parent_key]) && !empty($array[$first_parent_key]) && count($array[$first_parent_key]) == 1) {
      $result = $first_parent_key . '.' . $this->getChildKey($array[$first_parent_key]);
    }
    else {
      $result = $first_parent_key;
    }

    return $result;
  }
public function getChildKey(array $array) {
    reset($array);
    $first_parent_key = key($array);
    if (is_array($array[$first_parent_key]) && !empty($array[$first_parent_key]) && count($array[$first_parent_key]) == 1) {
      $result = $first_parent_key . '.' . $this->getChildKey($array[$first_parent_key]);
    }
    else {
      $result = $first_parent_key;
    }

    return $result;
  }
public function getChildKey ( array $ array ) { reset ( $ array ) ; $ first_parent_key = key ( $ array ) ; if ( is_array ( $ array [ $ first_parent_key ] ) && ! empty ( $ array [ $ first_parent_key ] ) && count ( $ array [ $ first_parent_key ] ) == 1 ) { $ result = $ first_parent_key . '.' . $ this -> getChildKey ( $ array [ $ first_parent_key ] ) ; } else { $ result = $ first_parent_key ; } return $ result ; }
Get path to nested array child key until it has 1 child element.

Example:
array(
'parent' => array(
'child1' => array(
'child1-1' => array(
'child1-1-1' => TRUE,
'child1-1-2' => TRUE,
'child1-1-3' => TRUE,
),
),
),
);
Result - 'parent.child1.child1-1'

@param array $array
Config object.

@return string
Path to array child key.
Get path to nested array child key until it has 1 child element .