You are here

function _simplenews_flatten_array in Simplenews 6.2

Same name and namespace in other branches
  1. 6 simplenews.module \_simplenews_flatten_array()

Flatten a nested array

2 calls to _simplenews_flatten_array()
simplenews_node_tab_send_form in ./simplenews.module
Simplenews tab form
simplenews_node_tab_send_form_submit in ./simplenews.module
Simplenews tab form submit callback

File

./simplenews.module, line 2334
Simplenews node handling, sent email, newsletter block and general hooks

Code

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