You are here

function mediafront_preset_array_flatten in MediaFront 6.2

Same name and namespace in other branches
  1. 6 includes/mediafront.preset.inc \mediafront_preset_array_flatten()
  2. 7.2 includes/mediafront.preset.inc \mediafront_preset_array_flatten()
  3. 7 includes/mediafront.preset.inc \mediafront_preset_array_flatten()

Flatten the settings array.

Parameters

<type> $array:

<type> $return:

Return value

<type>

1 call to mediafront_preset_array_flatten()
mediafront_preset_submit in includes/mediafront.preset.inc
Submit handler for the preset form.

File

includes/mediafront.preset.inc, line 289

Code

function mediafront_preset_array_flatten($array, $return = array()) {
  foreach ($array as $key => $value) {
    if (is_array($value)) {
      $return = mediafront_preset_array_flatten($value, $return);
    }
    else {
      $return[$key] = $value;
    }
  }
  return $return;
}