You are here

function _wfm_submission_data_expand in Webform Multiple (WFM) 7

Expand submission data into a multi-dimensional array.

1 call to _wfm_submission_data_expand()
_wfm_process_submission in ./wfm.module
Process a submission to expand data from multiple-value components.

File

./wfm.module, line 616
Main module file for Webform Multiple (WFM).

Code

function _wfm_submission_data_expand(array $data) {
  $output = array();
  foreach ($data as $key => $value) {
    if (strpos($key, '|') === FALSE && strpos($key, '#') === FALSE) {
      $output[$key] = $value;
      continue;
    }
    $key_parts = preg_split('/[#\\|]/', $key);
    drupal_array_set_nested_value($output, $key_parts, $value, TRUE);
  }
  return $output;
}