You are here

function eloqua_get_nesting in Eloqua 6

Recursively builds the array tree that will need to be parsed to find values in the post.

Parameters

$components - the components array from webform:

$cid - the component id:

Return value

array - an array representing tree selections to find a value

File

./eloqua.module, line 441

Code

function eloqua_get_nesting($components, $cid) {
  if ($components[$cid]['pid'] == 0) {
    return array(
      $components[$cid]['form_key'],
    );
  }
  else {
    return array_merge(eloqua_get_nesting($components, $components[$cid]['pid']), array(
      $components[$cid]['form_key'],
    ));
  }
}