You are here

function _filter_harmonizer_flatten in Views Filter Harmonizer 7

Flatten the supplied array or array of arrays into a single string.

Parameters

array $array: The array to flatten.

Return value

string String with items separated by plus signs.

1 call to _filter_harmonizer_flatten()
filter_harmonizer_views_exposed_form_submit in ./filter_harmonizer.module
Supplementary submit handler for 'views_exposed_form'.

File

./filter_harmonizer.module, line 655
filter_harmonizer.module For Views where both exposed and contextual filters are active on a page.

Code

function _filter_harmonizer_flatten($array) {
  if (!is_array($array)) {
    return $array;
  }
  foreach ($array as $key => $value) {
    if (is_array($value)) {
      $array[$key] = implode(',', $value);
    }
  }
  return implode('|', $array);
}